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

Re: Preserving character references?

Subject: Re: Preserving character references?
From: cutlass <cutlass@xxxxxxxxxxx>
Date: Fri, 12 Jan 2001 15:28:14 +0000
decimal 20 013
one very hack way of apparantly doing it
-------------------------------------------------------
XML document

<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet href="entity.xsl" type="text/xsl"?>
<entity>
<![CDATA[
&#32321;&#39636;&#20013;&#25991;
]]>
</entity>
--------------------------------------------------------

--------------------------------------------------------
XSL document

<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="xml"/>
<xsl:template match="/">


<xsl:value-of disable-output-escaping="yes" select="//entity"/>

</xsl:template>
</xsl:stylesheet>
---------------------------------------------------------

,jim fuller

Michael Lee wrote:

Is there a way I can preserve character references and their format (decimal
or hexadecimal) in a XML document when performing a XSLT transformation?
For example, if I have the following text in the source XML document:

&#x7E41;&#x9AD4;&#x4E2D;&#x6587;

I would like to have exactly the same thing in the output XML document:

&#x7E41;&#x9AD4;&#x4E2D;&#x6587;

I tried to perform transformations using MSXML3 (via XMLSpy) and Unicorn
XSLT Processor but both of them resolved the character references.

Also, the value of the encoding attribute in <xsl:output> of my XSLT
stylesheet was set to "UTF-8" element.  When I changed it to "ISO-8859-1",
Unicorn changed the character references into decimal form:

&#32321;&#39636;&#20013;&#25991;

Therefore, I want to know if there is any way I can force the XSLT processor
to preserve these character references and their format.  Thanks in advance!


Michael Lee mlee@xxxxxxxxxx


XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list






XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list


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.