Jump to content

XSL to find/replace a string?


Blaeze

Recommended Posts

I am using XSL to display my Twitter feed on my info page:[url="http://zonkzone.net/xls_test/mobile_info.html"]http://zonkzone.net/xls_test/mobile_info.html[/url]I've followed the tutorials on w3schools and it's all working very well but I am getting stuck trying to detect/replace strings with XSL.Basically I need to detect any string starting with 'http://...' and replace with '<a href="http://...">http://...</a>' to make them active links in HTML.The XLS file I am using is located here:[url="http://zonkzone.net/xls_test/xsl/twitter_mobile.xsl"]http://zonkzone.net/xls_test/xsl/twitter_mobile.xsl[/url](Just hit view source)Is that something that can be easily achieved with XSL and if not what is the alternative?Any suggestions well appreciated.
Link to comment
Share on other sites

Not in XSLT 1.0. Maybe with regular expressions in XSLT 2.0 or with EXSLT's reges:replace() if your XSLT processor suppors it.Either way, doing this is just as hard in XSLT 2.0 as it would be in any language. Doing it in XSLT 1.0 is harder.

Link to comment
Share on other sites

Not in XSLT 1.0. Maybe with regular expressions in XSLT 2.0 or with EXSLT's reges:replace() if your XSLT processor suppors it.Either way, doing this is just as hard in XSLT 2.0 as it would be in any language. Doing it in XSLT 1.0 is harder.
Thanks for checking out. So for an XSL novice like me probably no easy way round?
Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...