[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Output escaped characters that represent the CR as an

Subject: Output escaped characters that represent the CR as an attribute
From: good all <good2all@xxxxxxxxx>
Date: Wed, 29 Sep 2004 14:41:44 -0400
xsl escaped characters
Hi, all,

I have a requirement to out the escaped characters that represent the
CR as an attribute.What I want is:

<TagwithAttribute att1="XXXX&#x0D;&#x0A;YYYY"/>

Regards an old posts in this list, we can output these characters as:
<xsl:text disable-output-escaping="yes">XXXX&amp;#x0D;&amp;#x0A;YYYY</xsl:text>

However, this works fine to element only, doesn't work if I want to
assgin this to an attribute.Please see the following files.

Any replys are highly appreciated.

thanks.
Good2all

Source XML File:
------------------
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="x0Dx0A_Test.xslt"?>
<dummy/>

------------------
XSLT file:
--------------------
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:fo="http://www.w3.org/1999/XSL/Format">
<xsl:template match="/">
<someTag>
	<xsl:text disable-output-escaping="yes">XXXX&amp;#x0D;&amp;#x0A;YYYY</xsl:text>
	<tagwithattri>
		<xsl:attribute name="att1">
			<xsl:text disable-output-escaping="yes">XXXX&amp;#x0D;&amp;#x0A;YYYY</xsl:text>
		</xsl:attribute>
	</tagwithattri>
</someTag>
</xsl:template>
</xsl:stylesheet>


--------------------
Output XML File:
----------------------
<?xml version="1.0" encoding="UTF-8"?>
<someTag xmlns:fo="http://www.w3.org/1999/XSL/Format">XXXX&#x0D;&#x0A;YYYY
<tagwithattri att1="XXXX&amp;#x0D;&amp;#x0A;YYYY"/>
</someTag>

----------------------

--+------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe@xxxxxxxxxxxxxxxxxxxxxx>
--+--

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.