[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

[xsl] URL Encoding

Subject: [xsl] URL Encoding
From: "Serdar Kilic" <serdar@xxxxxxxxxx>
Date: Wed, 9 May 2001 20:02:15 +1000

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">
    function urlEncode(strURL)

     return encodeURI(strURL);


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

The script relies on version 5.5 of the Microsoft Script Engine.


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

Current Thread