Blog
URL encoding with PHP XSL
2007-06-02 14:41:25 by Martynas Jusevičius
In many situations, strings have to be encoded using the % notation before put in the URL, to avoid confusion with reserved characters such as : or /.
XSLT 1.0 has no standard function for URL encoding. In XSLT 2.0, encode-for-uri() function can be used. However, there are solutions for URL encoding in XSLT 1.0.
In case of the ISO-8859-1 charset, one can use encoding/decoding stylesheets from skew.org. It gets much more complicated with UTF-8 and a pure XSLT solution is not realistic — extension functions have to be used instead.
Using PHP's XSL extension, PHP's functions can be called directly from the stylesheet. registerPhpFunctions() method has to be called on the XSLT processor instance and PHP's namespace (http://php.net/xsl) has to be included in the stylesheet before doing that. Then PHP's urlencode() can be called from the stylesheet in such a way: php:function('urlencode', string('value')).
Comments (6)
well, hi admin adn people nice forum indeed. how's life? hope it's introduce branch ;)
Herigate of Pakistan
Discover the beauty of pakistan. Learn the culture, heritage, traditions and landmarks of different parts of Pakistan especially sindh, punjab, balochistan and N.W.F.P and far northern areas.
vydvlmlrei
Mjtx0U <a href="http://iuqackzktagh.com/">iuqackzktagh</a>, [url=http://exnszyaztgim.com/]exnszyaztgim[/url], [link=http://qpmrceilusoo.com/]qpmrceilusoo[/link], http://wxmqtihdqcls.com/
xCbBtQnmVxGDEoIQRU
269NMi <a href="http://bxqgxwquptrq.com/">bxqgxwquptrq</a>, [url=http://stycouvfjbqd.com/]stycouvfjbqd[/url], [link=http://tkssfiwinfdz.com/]tkssfiwinfdz[/link], http://jnxdqahazrew.com/
uIBrzktykgSNBDPMt
7J1I2A <a href="http://ydxhyuepguym.com/">ydxhyuepguym</a>, [url=http://lktgtfowanhe.com/]lktgtfowanhe[/url], [link=http://faomsyhyculh.com/]faomsyhyculh[/link], http://edeecpvgfrde.com/
wiHSJPhoCOAaNbIxrT
9QUtyD <a href="http://whqoburflwsu.com/">whqoburflwsu</a>, [url=http://wrqhbjntlpiw.com/]wrqhbjntlpiw[/url], [link=http://hvdqqservlqf.com/]hvdqqservlqf[/link], http://jypmabfybkwv.com/

hello guys need advice
2008-12-26 08:01:39 by cwxwwwxdfvwwxwx