I did not find this on the XSL list FAQ even though it is closely
related to many other questions that are there.
Why doesn't this XML content: •
produce this output: •
after parsing/xslt in my xhtml document???
It's bloody nigh impossible to get my XML parser (Xalan-Java) NOT to
recognize entities except for this one case where recognizing it
would solve all my problems. The xsl list FAQ under "Entities" item
13 "Passing Entities through a Transform" says that all entities are
resolved before the transform and implies the only way to get around
this is with a perlscript to strip entities of their ampersands. This
cannot be the whole truth because:
a) xalan won't resolve &#amp; in the above example and b) everyone
trying to produce html for posting would be screwed by having XML
docs with proper unicode references--nobody could set set stuff up so
cruelly (right?) c) In XSLT quickly, there's an example of how to
define entities in the xsl stylesheet using <xsltext> to avoid this
(p.90-91)--only you can't use this technique on a numbered entity
because evidently that's not valid xml so they don't exist, even
though they're all over the place.
I know this is an old subject; but after hours of investigating, I
still don't get it. I need to know why the above example doesn't
produce the right numbered entity reference, and what other ways
there are to preserve entities through a transform, and possibly how
unicode/numbered entities are defined and can be redefined. There
just has to be a way to do this within xslt. I'm sorry that I still
don't get this--please help anyway, somebody.
--
Thanks,
gregm
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list