|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: tokenize and split
On Fri, Feb 6, 2009 at 12:06 PM, Martin Honnen <Martin.Honnen@xxxxxx> wrote: > Andy Chambers wrote: >> > > Try whether > <xsl:stylesheet > xmlns:xsl="http://www.w3.org/1999/XSL/Transform" > xmlns:fn="http://www.w3.org/2005/xpath-functions" > version="1.0"> > > ... > > > <xsl:choose> > <xsl:when test="function-available('str:split')"> > <xsl:copy-of select="str:split('a b c', ' ')[1]"/> > </xsl:when> > <xsl:when test="function-available('fn:tokenize')"> > <xsl:copy-of select="fn:tokenize('a b c', ' ')[1]"/> > </xsl:when> > > works with Xalan. Thanks Martin, That works great. Just in case this comes up in a future search, I did have to add the "str" namespace too. <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:str="http://exslt.org/strings" xmlns:fn="http://www.w3.org/2005/xpath-functions" extension-element-prefixes="fn str"> -- Andy
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|






