This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

RE: Entity references in xml output


> 
> 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 &apos; may become ' and
' may become &apos;.

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 "&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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]