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
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:


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


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

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

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:

Current Thread