[Home] [By Thread] [By Date] [Recent Entries]

Subject: Re: String Replacement in XML using XSLT
From: Abel Braaksma <abel.online@xxxxxxxxx>
Date: Mon, 25 Sep 2006 20:48:59 +0200
Abel Braaksma wrote:
       <xsl:for-each select="tokenize(., '\[|\]')">
       </xsl:for-each>
For XSLT-1 remember to use the exslt:node-set extension

Sorry, no tokenize() function in XPath 1.0.But you can use the contains() suggestion from Mukul.


Also, my apologies for the ugly <xsl:for-each>, that can be done much neater, and even tokenize() is not the best choice I think, but I just wanted to make the point of making your template more readable with an extra step as a tree in a variable.

-- Abel

Current Thread
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member