[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

[xsl] ampersand character in xsl attribute?


Subject: [xsl] ampersand character in xsl attribute?
From: Dan Cederholm <dan@xxxxxxxxxxxx>
Date: Mon, 17 Dec 2001 20:22:53 -0600 (CST)

Hi all,

I'm a newbie to the list, so I apologize if this has been answered before.
I've been searching everywhere for a solid answer on this.

Is it true that it's impossible to have a stylesheet ouptut an "&"
character when inside an attribute?  For example, I have a URL that
includes an ampersand as part of a query string -- not the entity -- and I
can get this to print out just fine when doing a simple <xsl:value-of>, but when it's inside an
<xsl:attribute> or even when I hold it in a variable and do <A
HREF="{$foo}">, it always prints out &amp;.

I've tried disable-output-escaping with no luck.  Very frustrating... I
realize it's "bad HTML" to not use &amp;, but since this is for an HTML
version of a newsletter, I don't trust that email clients will convert the
URL correctly.  Not sure who's bright idea it was to make the beginning
character of an entity, an entity itself :)

Thanks!

Dan Cederholm


--
dan@xxxxxxxxxxxx


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list



Current Thread