[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: HTML parameters and Ampersands

Subject: RE: HTML parameters and Ampersands
From: "Friedlander, Hal" <Hal@xxxxxxxxxxxx>
Date: Wed, 4 Oct 2000 09:59:53 -0400
html parameters
Have you tried using the character value &#38; or #38; in replace of &amp;
in your XSL?

-----Original Message-----
From: David_Benua@xxxxxxxxxxxxxx [mailto:David_Benua@xxxxxxxxxxxxxx]
Sent: Tuesday, October 03, 2000 11:22 PM
To: XSL-List@xxxxxxxxxxxxxxxx
Subject: HTML parameters and Ampersands


I'm generating HTML on the server with XT, and I've run into what I think
should
be a common situation.

I want to build a link in my HTML page that passes multiple parameters: <a
href="baseurl.htm?param1=1&param2=2">Label Text</a>

My XML (much simplified) looks like this:

<LinkList>
     <Link param1="1" param2="2">Label</Link>
     <Link param1="10" param2="20">Label2</Link>
</LinkList>

The problem is getting the Ampersands to come out without escaping. If the
XSL
is like this: (ignoring the whitespacing issues for clarity)

<xsl:for-each select="/*/Link">
     <a>
     <xsl:attribute name="href">
          baseurl.htm?param1=
          <xsl:value-of select="@param1"/>
          &amp;param2=
          <xsl:value-of select="@param2"/>
                </xsl:attribute>
     <xsl:value-of select=".">
     </a>
</xsl:for-each>

leads to output like this:

<a href="baseurl.htm?param1=1&amp;param2=2">Label</a>

which is close, but not quite what I need.  I've also tried:

<xsl:for-each select="/*/Link">
     <a>
     <xsl:attribute name="href">
          baseurl.htm?param1=
          <xsl:value-of select="@param1"/>
          <text disable-output-escaping="yes">&amp;param2=</text>
          <xsl:value-of select="@param2"/>
                </xsl:attribute>
     <xsl:value-of select=".">
     </a>
</xsl:for-each>

but this gets an error message about "illegal use of
disable-output-escaping"

Do any of you gurus out there have any other suggestions?

Thanks

Dave




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


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


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.