This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
URL Encoding
- To: <xsl-list at lists dot mulberrytech dot com>
- Subject: [xsl] URL Encoding
- From: "Serdar Kilic" <serdar at skilic dot com>
- Date: Wed, 9 May 2001 20:02:15 +1000
- Reply-To: xsl-list at lists dot mulberrytech dot com
Hi All,
Thanks to all who helped my url encoding problem, even though I had
trouble getting it working :)
Here is a solution that I found, although it relies on the msxsl namespace.
<msxsl:script language="JScript" implements-prefix="user">
<![CDATA[
function urlEncode(strURL)
return encodeURI(strURL);
}
]]>
</msxsl:script>
..that's it, and then down below I call it like this:
<xsl:value-of select="user:urlEncode(string(//parentCategory))" />
one weird problem that I had was that I *had* to use the string function, I
thought that (//parentCategory) would have been fine as is, but I was
mistaken.
The script relies on version 5.5 of the Microsoft Script Engine.
Regards,
Serdar
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list