This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
disabling output escaping within an xsl attribute
- To: XSL-List at mulberrytech dot com
- Subject: disabling output escaping within an xsl attribute
- From: joseph_jacob at hp dot com
- Date: Wed, 31 May 2000 01:53:38 -0700
- Reply-To: xsl-list at mulberrytech dot com
I want to generate html output where & (ampersand) characters are not escaped.
Palm VII Web Clipping Applications do not understand the & character
representation in a URL.
They know how to handle the literal '&' character representation.
Or in other words I want:
http://www.dot.com/service?foo=1&bar=2
and not
http://www.dot.com/service?foo=1&bar=2
I cannot seem to get disable-output-escaping to work within an xsl:attribute. I
can get it to work for non-attributes. What am I doing wrong ?
Relevant XSL Code fragment
------------------------------------
<*snip*>
<xsl:template match="hedline">
<xsl:element name="b">
<xsl:element name="a">
<xsl:attribute name="href">
<xsl:value-of disable-output-escaping="yes"
select="string('http://www.dot.com/service?foo=1&bar=2')" />
</xsl:attribute>
</xsl:element>
<xsl:value-of disable-output-escaping="yes"
select="string('&www.dot.com&')"/>
</xsl:element>
</xsl:template>
<*snip*>
generated the following output:
<b><a href="http://www.dot.com/service?foo=1&bar=2"></a>&www.dot.com&</b>
Note that the disable-output-escaping doesn't seem to work for the href
attribute ( & is retained as &).
Any help would be greatly appreciated.
-joe
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list