xsl-list
[Top] [All Lists]

Re: [xsl] tokenize

2011-10-14 08:39:49
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

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

<Prev in Thread] Current Thread [Next in Thread>