I have to replace a substring by another string in XSLT 1.0. I'm able to test that str:replace() function is working from this third party implementation: http://exslt.org/str/functions/replace/str.replace.function.xsl. I am wondering whether the implementation is stable to use?
I can see that replace() is available only from XSLT 2.0. I looked at translate() which is working for XSLT 1.0 but not doing the exact thing as replacing substring, so I found the third party implementation as the only possible approach as of now.
Please suggest:
- the third party implementation of
str:replace()is stable? - Is there another better way to approach replace in XSLT 1.0?