This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Re: Keeping entities of source file (was:Testing the number of child elements)
- To: xsl-list at mulberrytech dot com
- Subject: Re: Keeping entities of source file (was:Testing the number of child elements)
- From: David Carlisle <davidc at nag dot co dot uk>
- Date: Fri, 11 Feb 2000 11:24:19 GMT
- References: <38A3EBA9.106845FC@xrce.xerox.com>
- Reply-To: xsl-list at mulberrytech dot com
> My source file contains <mo> elements with content like ±
Your souce ___file____ contains ± however _before_ it is seen
by XSL it is parsed by an XML parser which will replace every entity
reference by its definition.
So if you use the mathml dtd, your stylesheet can not tell whether your
source file had ± or had character data, it produces the same
source tree.
> And I want this to go unchanged into the output file.
No you don't actually, for amaya you want character position 1234
(whatever it is)) to be output as ± however it was entered,
either as a character reference, or entity reference or as data.
It would be possible to use the string-replace recursion technique
discussed on this list earlier in the week, but to be honest it might be
simpler just to output character data from xsl and then just use perl to
back translate the characters to entity references. (Or try to get amaya
fixed not to need this)
> xsl:value-of disable-output-escaping="yes" select="."/>
xsl:text not xsl:value of
You might want to check th efaq and archives of this list wher ethis has
been discussed several times in the past.
David
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list