tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher Schultz <>
Subject Re: ampersand (&amp;) handling in jspx - any workaround?
Date Wed, 14 Feb 2007 20:35:59 GMT
Hash: SHA1


Stefan wrote:
> Christopher Schultz schrieb:
>> Compare this to XSLT. If you want a stylesheet to emit an '&', don't you
>> use &amp;? And if you want to emit '&amp;' you have to double it. I
>> don't see the difference, and I think that the OP is being
>> unreasonable ;)
> Not in my xslt ;-) It depends of the output method. If you output xml,
> &amp; still gets &amp; It is meanless to create a not well formed xml. I
> don't remember what the output method text or html makes.

Fair enough. When you put "&amp;" into your XSLT, the processor sees it
as "entity:amp". When you write that out, the exact display depends on
the output format. If it's emitting XML (or XHTML), you get "&amp;"
right back out.

But, if you're outputting HTML (?) or text (definitely), then you get
'&'. If you want to emit "&amp;" in text mode, you'll definitely have to
double-up the amps.

The problem is that JSPX is not XSLT. It's really JSP with some extra
junk thrown in. Fortunately for me, I don't have to use it ;)

- -chris
Version: GnuPG v1.4.6 (MingW32)
Comment: Using GnuPG with Mozilla -


To start a new topic, e-mail:
To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message