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

Forum statistics

Threads
473,994
Messages
2,570,223
Members
46,810
Latest member
Kassie0918

Latest Threads

Top