xsl-list
[Top] [All Lists]

Re: [xsl] String Replacement in XML using XSLT

2006-09-25 12:52:01
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

--~------------------------------------------------------------------
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>
--~--