[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: recursive xsl replace

Subject: Re: recursive xsl replace
From: Joelle Tegwen <tegwe002@xxxxxxx>
Date: Tue, 08 May 2007 11:43:03 -0500
Re:  recursive xsl replace
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

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.