xsl-list
[Top] [All Lists]

Re: Character substitution

2005-01-10 09:42:03
David Carlisle wrote:
how is the euro character represented in your document ?


It never matters how the source document is encoded, all such matters
are resolved by the XML parser before XSLT starts.

yes, yes

Numeric character references are not entity references (they refer to
characters not entities) the number for Euro is 8364 not 128.

xml
<?xml version="1.0"?>
<test>&#128;</test>     

xslt
<?xml version="1.0"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform";>
        <xsl:output encoding="ISO-8859-1"/>
        <xsl:template match="/">        
                        <xsl:copy-of select="test"/>
        </xsl:template>
</xsl:stylesheet>

I get a nice little euro symbol

<html>
<title></title>
<body><test>&#128;</test></body>
</html>

......though only with the Windows-1252 and ISO-8859-1 encodings.....

...and yes its a numeric character reference...sorry always mix up my words....a bit rusty these days!

cheers, Jim Fuller



--~------------------------------------------------------------------
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(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--



<Prev in Thread] Current Thread [Next in Thread>