You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-users@xalan.apache.org by Christine Li <jy...@ca.ibm.com> on 2003/08/08 15:26:08 UTC

Re: builtin function tokenize() + position() = Xalan-J bug?




Hi, Hermann

Please try to use the latest code from CVS or the nightly gump build
http://xml.apache.org/xalan-j/builds.html#gump
if it still doesn't work, please open a bug report with your test case.
http://nagoya.apache.org/bugzilla/

Thanks,

Christine Li
XSLT Development
IBM Toronto Lab
Tel: (905)413-2601
Email: jycli@ca.ibm.com


                                                                                                                                       
                      Hermann Schier                                                                                                   
                      <h.schier@fkf.mpg        To:       xalan-j-users@xml.apache.org                                                  
                      .de>                     cc:                                                                                     
                                               Subject:  builtin function tokenize() + position()  = Xalan-J bug?                      
                      08/08/2003 05:10                                                                                                 
                      AM                                                                                                               
                                                                                                                                       
                                                                                                                                       



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: h.schier@fkf.mpg.de
--------------------------------------------------