By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,788 Members | 1,115 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,788 IT Pros & Developers. It's quick & easy.

Generating entities from XSLT

P: n/a
I have some (somewhat ragged) HTML, and I wish to pre-process it with
XSLT before putting it back onto the server. Throughout this HTML are
many character entity references, such as "&ecaute;".

After the XSLT process, I _must_ preserve these character entity
references, i.e. I can't let them turn into "".
Is there any way to do this ? Every combination of processor, XSLT
coding and sundry DTD and schema reference juggling causes the
processor to spit out "" rather than "&ecaute;". I know this is
valid in context, but when I put it back into the rest of my system it
won't be.

So far the only reliable way I've found to reliably produce an entity
reference is like this:
<xsl:text disable-output-escaping="yes" >&amp;eacute;</xsl:text>

Obviously this is inflexible, and as <xsl:text> doesn't let me have
any child elements I can't do this dynamically, even by hairy
string-mangling.
Thanks for any assistance.
Jul 20 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Andy Dingley wrote:
I have some (somewhat ragged) HTML, and I wish to pre-process it with
XSLT before putting it back onto the server. Throughout this HTML are
many character entity references, such as "&ecaute;".

After the XSLT process, I _must_ preserve these character entity
references, i.e. I can't let them turn into "".
Is there any way to do this ?


encoding="us-ascii"?

xpost and f'up2 comp.text.xml
--
Johannes Koch
In te domine speravi; non confundar in aeternum.
(Te Deum, 4th cent.)
Jul 20 '05 #2

P: n/a
Johannes Koch <ko**@w3development.de> wrote in message news:<2i************@uni-berlin.de>...
encoding="us-ascii"?


Sadly no (with the XSLT processors I've tested so far, anyway) - that
generates an entity, but it's a numeric entity rather than a character
reference. As the output from this goes back to manual editors, I'd
really like to preserve them in the "more readable" form.
Jul 20 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.