Hi,

I encountered a strange situation using Xalan-J 2-5-1
using the buitin extension tokenize() inside a for-each loop.
Please see the example below.

If I use the position() function, Xalan goes wild.
The output is then:
, 20012323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232
323232323232323232323


If I take out the position() test everything is fine:
2001060311402

Is this related to this long lasting position() problem in Xalan or
did I just not get the point?

Any ideas?
Many thanx in advance!

Hermann

----------run against any xml file----------------------------------------------
<?xml version="1.0"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
xmlns:xalan="http://xml.apache.org/xalan";
exclude-result-prefixes="xalan">
<xsl:output method="text"/>
<xsl:template match="/">
<xsl:for-each select="xalan:tokenize('2001-06-03T11:40:23', '-T:')">


<!--     Any test using position() kills the node-set!-->
        <xsl:if test="position()!=last()">, </xsl:if>
<!--    without the statement above everything is fine -->

        <xsl:value-of select="."/>
     </xsl:for-each>
</xsl:template>
</xsl:stylesheet>
--------------------------------------------------------------

--
--------------------------------------------------
Dr. Hermann Schier
Max-Planck-Institut fuer Festkoerperforschung
Informationsvermittlung der CPT-Sektion
Heisenbergstr. 1, D-70569 Stuttgart
Tel. ++-(0)711-689-1284 FAX ++-(0)711-689-1292
e-mail: [EMAIL PROTECTED]
--------------------------------------------------





Reply via email to