Re: [xsl] recursive xsl replace

Subject: Re: [xsl] recursive xsl replace
From: Abel Braaksma <abel.online@xxxxxxxxx>
Date: Tue, 08 May 2007 17:59:18 +0200
Joelle Tegwen wrote:
I've been struggling with this for hours and I'm not getting anywhere and I'm behind on an already delayed deadline. Any help would be most appreciated.

<snip />

But it doesn't work. It only replaces the first term.

What am I doing wrong?

PS I'm using the PHP xsl transformer which apparently does not support fn:replace() :P


which is an XSLT 2.0 function and libxsl (which is used by PHP I believe) is an XSLT 1.0 parser. Not sure, but perhaps you can use regexp:replace() from EXSLT extensions. There is a libexslt, not sure you can use it with PHP though: http://xmlsoft.org/XSLT/EXSLT/index.html.


There are many examples online of how to do multiple replace in XSLT 1.0 (in 2.0 it is far easier). Here's one: http://www.stylusstudio.com/xsllist/200404/post70930.html#

Cheers,
-- Abel Braaksma

Current Thread