Jump to content

XSL to find/replace a string?


Blaeze
 Share

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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...