XSLT: need some help on entities

R

Romeo Disca

Hello,

i just want to make an identity transformation
of an xhml document and i don't want entities to be resolved.

  should result in   and not ' '.

Is there any chance to perform this.

Thanks.

Romeo
 
M

Mike Brown

Entity resolution occurs during XML parsing; it is part of the standard. You
want nonconformant behavior? Why does it matter? A no-break space is a
no-break space, regardless of whether it is encoded directly or written as a
numeric character reference or entity reference.

If you're talking about doing your identity transformation with XSLT,
setting encoding="us-ascii" in your xsl:eek:utput element will help. At least,
you'll get   or   when the output method="xml". You can
post-process this with a simple sed, perl or python script to replace with
 .

Some XSLT processors offer a special XHTML output method (which is
nonstandard), which will probably appear to do what you want. (emphasis on
"appear"...). Some XSLT processors offer additional features to tweak the
output of the standard xml output method a bit, but they're not going to
turn non-ASCII characters into XHTML entity references for you.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,009
Latest member
GidgetGamb

Latest Threads

Top