This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
RE: Entity references in xml output
- To: "'xsl-list at mulberrytech dot com'" <xsl-list at mulberrytech dot com>, sacerdot at students dot cs dot unibo dot it
- Subject: RE: Entity references in xml output
- From: Kay Michael <Michael dot Kay at icl dot com>
- Date: Thu, 2 Mar 2000 19:37:03 -0000
- Reply-To: xsl-list at mulberrytech dot com
>
> My letter wasn't clear enough, I think. I would like to do the
> following:
No, my reply wasn't clear enough. I understand exactly what you want, and at
present in XSLT you can't have it, because the processing model is that
entity references are expanded before the source tree is built, so they
aren't visible as an input to the transformation. And because the tree model
is symmetric, entities cannot be placed on the result tree either.
Mike Kay
> So, I'd like to have entities in output.
> ------------------------------
>
> When I use the <xsl:output method="html"/> then some entities are good
> some are not. But I want to use the xml output.
Whether you get entity references or not in HTML output is entirely at the
discretion of the XSLT processor. However, they won't be directly related to
any use of entities in the source file. For example ' may become ' and
' may become '.
In Saxon 5.2, I generate entity references in HTML output for characters in
the range 160 to 255. This is very arbitrary but it seems to keep a lot of
people (especially Western Europeans) content.
>
> Is there a way to solve this without declaring entities like <!ENTITY
> eacute "é">?
Declaring entities doesn't make any difference, I'm afraid. The XSLT
processor won't see them.
Regards,
Mike Kay
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list