Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: Is it possible NOT to replace entity references?

From: richard@------.--.--.-- (------- -----)
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 &auml; 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 &auml; when outputting
XML because in general that won't be defined, so it will output 
&#228; or &#xE4;.

-- Richard


transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent