Connecting Tech Pros Worldwide Help | Site Map

Decoding URL encoded string using XSLT

Newbie
 
Join Date: Aug 2007
Posts: 21
#1: Dec 28 '08
Is there any way to decode a URL encoded string using XSLT?

For example, this is the string that I have:
This%20is%20the%20%3Ctable%3E%20tag

And this is what I wanted XSLT to output:
This is the <table> tag
Dormilich's Avatar
Moderator
 
Join Date: Aug 2008
Location: Leipzig, Germany
Posts: 3,629
#2: Dec 29 '08

re: Decoding URL encoded string using XSLT


not that I'm aware of...

nevertheless, you can do some manipulation by hand
- the best way is to do an url decoding before the string comes to xslt (if possible)
- if you have a very limited number of percent escapes, you can use the translate() function
- you can replace the percent escape by "&#x" {number} ";" and hope that your xslt processor can handle hexadecimal unicode entities

regards
Newbie
 
Join Date: Aug 2007
Posts: 21
#3: Dec 29 '08

re: Decoding URL encoded string using XSLT


Thanks! I thought I missed something but there is no built in thing in XSLT to clean up the string.
Reply