[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

[xsl] Re:


Subject: [xsl] Re:
From: Brook Ellingwood <brook@xxxxxxxxxxx>
Date: Tue, 26 Aug 2003 09:59:06 -0700

Dan,

You can't use an HTML entity in XML. You should use the equivalent entity
from the UTF-16 character set. This URL is convenient for finding the common
character codes:
http://www.hclrss.demon.co.uk/demos/ansi.html

This URL has far greater scope if you ever need to find a less common code:
http://www.alanwood.net/unicode/search.html

In theory, if you are using a Unicode-aware text editor, you can set the
encoding of your file to UTF-16 (or UTF-8) and just type the characters in
without using the entities, but I've had pretty lousy luck getting that to
work all the way to the browser. For now, you're safer to use the entities.

-- Brook

> From: "Whitney, Dan (CanWest Interactive)" <DWhitney@xxxxxxxxxxx>
> Reply-To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> Date: Tue, 26 Aug 2003 12:30:08 -0400
> To: "'mulberry - xsl'" <xsl-list@xxxxxxxxxxxxxxxxxxxxxx>
> 
> I have the following XML fragment:
> 
> <RECORDITEM sqlsource="cityprov" colname="col4">Montr&eacute;al,
> QC<RECORDREF>specialannual</RECORDREF></RECORDITEM>
> 
> I want my output to be:
> 
> <td>Montr&eacute;al</td><td>specialannual</td>
> My xsl is:
> <xsl:for-each select="RECORDITEM">
> <td align="right">
> <font face="verdana" size="1">
> <xsl:value-of select="text()"/>
> </font>
> </td>
> <td align="right">
> <font face="verdana" size="1">
> <xsl:value-of select="RECORDREF"/>
> </font>
> </td>
> </xsl:for-each>
> When I use ie 6.0 to open this the entity "&eacute;" is not interpreted as
> text? so I get something like the following:
> <td align="right>Montr</td><td align="right">specialannual</td>
> When I translate it with saxon everything comes out as I want.
> Which is correct and can I write my XSL to overcome the discrepancy?
> 
> 
> Thanks in advance,
> 
> Dan Whitney
> 
> 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
Keywords