This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

problem escaping ampersand within quotations


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 &amp; 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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]