Altova Mailing List Archives>Archive Index >comp.text.xml Archive Home >Recent entries >Thread Prev - Re: Is it possible NOT to replace entity references? [Thread Next] Re: Is it possible NOT to replace entity references?To: NULL Date: 9/6/2005 11:56:00 AM In article <kM5Te.71904$2Q3.70620@t...>, Stephan Hoffmann <shh@t...> wrote: >You are right, these are two 'issues', I confused them because >the Python SAX parser I use replaces both the predefined and the not >predefined entity references, which is ok. I simply assumed an XSLT >processor would also replace both, but that assumption is probably wrong. It doesn't really make sense to contrast a parser with an XSLT processor. An XSLT processor will use a parser to read the document and stylesheet, and that parser must replace entity references with the characters they represent as it reads the files. Your problem is with what happens on *output*: whether the program replaces characters with entity references. >I don't know why I prefer ä over 'ä', maybe because 7-bit >ASCI seems to be more portable, but I can't really find a use case >where 'ä' would be less portable. XML parsers have to be able to handle UTF-8, so it won't be a problem for any XML tools. It may be a problem for other tools (or humans) that only understand ASCII. You can use the encoding attribute on xsl:output to tell the XSLT processor what output encoding to use (though it isn't guaranteed to support them all). If you tell it to use ASCII and you output a non-ascii character, it should use a numeric characters reference. It can't use ä when outputting XML because in general that won't be defined, so it will output ä or ä. -- Richard | ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
