Getting & to convert to %26 in URI
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 & 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"/>&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
PURCHASE STYLUS STUDIO ONLINE TODAY!
Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!
Download The World's Best XML IDE!
Accelerate XML development with our award-winning XML IDE - Download a free trial today!
Subscribe in XML format