How can I urlencode url parameter in XSLT?
There is a rawurlencode function in php that does what I want, urlencode according to RFC 3986.
XPath 2.0 (and therefore XSLT 2.0) has a function encode-for-uri. I do not know how to do this in simple XPath 1.0 / XSLT 1.0 without using extension functions.
encode-for-uri
You can also use EXSLT str:encode-uri(., 'true', 'UTF-8')in the namespacestr=http://exslt.org/strings
str:encode-uri(., 'true', 'UTF-8')
str=http://exslt.org/strings
Most popular XSLT 1.0 processors support EXSLT firmly.