This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
problem escaping ampersand within quotations
- To: <XSL-List at mulberrytech dot com>
- Subject: problem escaping ampersand within quotations
- From: "Amanda Birmingham" <amanda at elity dot com>
- Date: Tue, 23 May 2000 10:52:28 -0400
- Reply-To: xsl-list at mulberrytech dot com
Hi--
I'm attempting to form ASP query string via XSL using msxml. The
finished product I'm trying to achieve should look like this:
<a href="#"
onclick="parent.navigationPane.location.href='Navigation.asp?RuleID=1&Rulety
pe=simple'">
However, that ampersand inside the href value *inside* the onclick value is
giving me trouble!
If I simply put the ampersand, the xsl isn't well-formed. If I do as
shown below,
<xsl:attribute name =
"onclick">parent.navigationPane.location.href='Navigation.asp?RuleID=<xsl:va
lue-of /><![CDATA[&]]>Ruletype=<xsl:value-of select="context(-2)/RULETYPE"
/>'</xsl:attribute>
I get & instead of & in the final html; if I wrap the CDATA tags in
<xsl:comment> tags, I get <!--&--> instead of & in the final html. Anyone
know how I can get around this??
Thanks,
Amanda Birmingham
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list