Re: [xslt] str:split, str:tokenize and empty tokens

Yes, I found that function useless because of it, so I wrote my own (slow) in xslt which I think I posted here many years ago.

I also find it sometimes useful to know what the separator was


On Tue, Oct 23, 2012 at 4:00 PM, Nick Wellnhofer <wellnhofer aevum de> wrote:
I just found out that str:split and str:tokenize extension functions ignore empty tokens. For example, take the following stylesheet:

<xsl:output indent="yes"/>
<xsl:template match="/">
        <xsl:copy-of select="str:split('a|b||c', '|')"/>

And it will produce:


This seems wrong to me, and I couldn't find anything in the EXSLT spec that mandates this behavior. Thoughts?

xslt mailing list, project page
xslt gnome org

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]