[XSL-LIST Mailing List Archive Home]
Re: [xsl] String Replacement in XML using XSLT
Subject: Re: [xsl] 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(., '\[|\]')">
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.