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

Getting & to convert to %26 in URI

Subject: Getting & to convert to %26 in URI
From: drcambron <drcambron@xxxxxxxxxx>
Date: Tue, 21 Nov 2000 12:21:53 -0700
convert
I've been following this list and learning.  I'm now stuck on something.  I
have some XML data I am using with the production released MSXML3 in IE5 to
build a URI in HTML. An ID element in the XML may have '&' chars in it and I
can't seem to find the way to get it properly escaped.  For example the
actual data may look like:

MARK & SCAN

and the XML for the ID element that I send to the browser looks like:

<ID>MARK&#x20;&#x26;&#x20;SCAN</ID>

In the XSL code, I simply try to build the URI as follows (not everything is
here...)

<a>
  <xsl:attribute name="href">
    <xsl:value-of select="$Server"/>?ID=<xsl:value-of select="ID"/>&amp;APP=
etc...
  </xsl:attribute>                  
  <xsl:value-of select="ID"/>
</a> 

I have <xsl:output method="html"/> set, and when I copy the link into the
address field on the browser, I see that the spaces have converted, but not
the & char.  The URI will look like:

http://server?ID=A%20&%20B&APP= etc... with the & still explicity there
hosing my URI.  I'm sure I'm missing something simple.

Thank you in advance for any help.

dan cambron



 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.