Re: [xsl] Using accented characters in XML

Subject: Re: [xsl] Using accented characters in XML
From: David Carlisle <davidc@xxxxxxxxx>
Date: Sat, 19 May 2001 17:17:30 +0100


> The reason it's failing, is because that character need to be encoded as an
> 'entity' - I think I have an entities list around here somewhere.
> 
> anyway, that character should be encoded as &#201;
> 
> _watch_out_ with your entities, though - I was trying to use &nbsp; (the
> ever present space in html) and my xslt processor barfed on it. I think
> sablot has trouble with named entities. I'm not sure if that's a global
> problem with xslt processors.
> 
> I've reverted to using the entity id's _only_ :)
> 
That is misleading advice.
Firstly characters do not need to be encoded as entities, the default
utf8 and uttf16 encodings can handle the full unicode range as character
data.

Secondly entity references such as nbsp; are not handled by your XSLT
system but by the XML parser and they always require a DTD that defines
those entities excpt for the five predefined entities
amp quot lt gt and apos

thirdly character references such as &#160; are not entiy references
they are treated differently by the XML parser.

David

_____________________________________________________________________
This message has been checked for all known viruses by Star Internet
delivered through the MessageLabs Virus Scanning Service. For further
information visit http://www.star.net.uk/stats.asp

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


Current Thread