[xsl] Ampersand in url

Subject: [xsl] Ampersand in url
From: Jeroen Janssen <jeroen@xxxxxxxx>
Date: Thu, 13 Sep 2001 13:04:40 +0200
I'm trying to construct a url in my xsl, the url contains an ampersand and I
can't get it to output it as & instead of &amp;


I want this:
action="storecountry.asp?id=1&mode=edit"

But I get this:
action="storecountry.asp?id=1&amp;mode=edit"

I have tried every possible combination of CDATA and enable-output-escaping,
but to no avail.

I have tried this:

<form method="post">
    <xsl:attribute name="action">storecountry.asp?id=<xsl:value-of
select="country/@id"/><xsl:text
disable-output-escaping="yes"><![CDATA[&]]>mode=</xsl:text><xsl:value-of
select="$mode"/>
    </xsl:attribute>


This:

<form method="post">
    <xsl:attribute name="action">storecountry.asp?id=<xsl:value-of
select="country/@id"/><![CDATA[&]]>mode=<xsl:value-of select="$mode"/>
    </xsl:attribute>

And this:

<form method="post">
    <xsl:attribute name="action">storecountry.asp?id=<xsl:value-of
select="country/@id"/><xsl:text
disable-output-escaping="yes">&#38;mode=</xsl:text><xsl:value-of
select="$mode"/>
    </xsl:attribute>

And a couple more variations... but the result is always the same: &amp; in
the result.

I'm using msxml 3 btw.


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


Current Thread