This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: URL encoding


> Is there a quick way to encode URLs in XSL? 
> 
> Ex: Convert 
> http://myurl.com/document.html?param1=foo1&param2=foo2 to 
> http%3A%2F%2Fmyurl.com%2Fdocument.html%3Fparam1%3Dfoo1%26param
> 2%3Dfoo2 
> 
There isn't a built-in function to do it, though we're planning to add
one in XPath 2.0.

But more to the point, your encoding is wrong according to RFC 2396.
Special characters such as "/", "?", and ampersand should be %HH-encoded
only when they are used as ordinary characters, not when they are used
with their special meanings.

Michael Kay
Software AG
home: Michael.H.Kay@ntlworld.com
work: Michael.Kay@softwareag.com 


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]