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

Re: Multiple String Replacements [with a twist]

Subject: Re: Multiple String Replacements [with a twist]
From: David Carlisle <davidc@xxxxxxxxx>
Date: Tue, 27 Mar 2007 21:19:49 +0100
Re:  Multiple String Replacements [with a twist]
are ypu using xslt 2 or xslt 1 (it's easier in 2) but basically you are
losing nodes because the string functions such as substring-before
conver their arguments to a string, and the strig value of a node is
just the character data of all its descendants.

Basically the thing to do is apply templates to your source and then
apply teh trplacement to text nodes ie match="text()" so you do the
replacemet to each text string separately and then there are no nodes to
lose in the process. The FAQ has exapmes (I think) and teh archives of
this list have plenty too, but I'm not sure of the details of what ypu
need as I don't think you showed your input file, or the format of your
multiple replacement specification, just the format of one replacement.

David

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.