Re: [xsl] tokenize

Subject: Re: [xsl] tokenize
From: Peter Flynn <pflynn@xxxxxx>
Date: Fri, 14 Oct 2011 14:40:31 +0100
On 14/10/11 14:00, G. Ken Holman wrote:
> At 2011-10-14 13:51 +0100, Peter Flynn wrote:
[...]
>>     <xsl:variable name="uri">
>>       <xsl:value-of
>>            select="translate(h:td[@class='xl'],'&#160;&#xa;','')"/>
>>     </xsl:variable>
> 
> The above could simply be:
> 
>  <xsl:variable name="uri"
>                select="translate(h:td[@class='x1'],'&#160;&#xa;','')"/>

It certainly could be: it actually was until I started trying to find
the error :-)

> That surprises me ... I would have expected "" because tokenize produces
> an empty string in front of the first "/".  If you look on pages 300 and
> 303 of my XSLT book here you will see that tokenize() produces a
> non-matching substring before the first match:

That's right.

It turned out to be the Java implementation :-)

If I use /usr/bin/java, which on this Ubuntu 10.4 system is actually
gij, it fails as described.

If I use /usr/local/java/jdk/bin/java, which is where I put Sun's Java,
it works correctly.

I don't know where the bug is, but I'm sure Michael knows about it :-)
And the moral of the story is, use real Java, never gij.

Sorry for the interruption, and thanks for the contributions.

///Peter

Current Thread