xsl-list
[Top] [All Lists]

Re: [xsl] recursive xsl replace

2007-05-08 09:43:29
This isn't quite what I meant.

I figured out a way to get around the missing replace function. My problem is with the recursion. My function only changes the text for one of the glossary items, not all 3 (for this example... there may be more or less).

Thanks!
Joelle

Abel Braaksma wrote:
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



--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--



--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

<Prev in Thread] Current Thread [Next in Thread>