Hi, Hermann
It is a problem with JDK 1.4.*. It packed an old version of Xalan in the
rt.jar, in your case it is Xalan 2.2.D11. You can find some help at FAQs
http://xml.apache.org/xalan-j/faq.html#faq-N100CB
Christine Li
XSLT Development
IBM Toronto Lab
Tel: (905)413-2601
Email: [EMAIL PROTECTED]
Hermann Schier
<[EMAIL PROTECTED] To: Christine
Li/Toronto/[EMAIL PROTECTED]
.de> cc:
Subject: Re: builtin function
tokenize() + position() = Xalan-J bug?
08/11/2003 11:03
AM
Hi Christine,
>I've tested your stylesheet with Xalan2.5.1 release, i got the result ",
>2001, 06, 03, 11, 4023", which, I think, is the right output.
>
Oh yes, exactly!
>I can't
>reproduce the problem. Please run environment check, "java
>org.apache.xalan.xslt.EnvironmentCheck", to make sure that you are using
>Xalan2.5.1.
>
That is indeed strange.
I used xalan-j_2_5_1-bin-2jars.tar.gz from 2003-08-07.
I called Xalan-2.5.1 explicitly, please find below
I have really no idea what is going wrong.
But until now didn't had the time to compile the latest version from
cvs, sorry.
Many Thanx!
Hermann
----------------------------------------------------------------------------------------------------------
[EMAIL PROTECTED]:~/ivs/mfjb_2002> echo $XALAN_HOME
/home/schier/ivs/mfjb_2002/xalan-j_2_5_1/bin
[EMAIL PROTECTED]:~/ivs/mfjb_2002> ls -la xalan-j_2_5_1-bin-2jars.tar.gz
-rw-r--r-- 1 schier users 11246344 2003-08-07 11:28
xalan-j_2_5_1-bin-2jars.tar.gz
[EMAIL PROTECTED]:~/ivs/mfjb_2002> java -cp xalan-j_2_5_1/bin/xalan.jar
org.apache.xalan.xslt.EnvironmentCheck
#---- BEGIN writeEnvironmentReport($Revision: 1.7 $): Useful properties
found: ----
java.version=1.4.1_02
#---- BEGIN Listing XML-related jars in: foundclasses.java.class.path ----
xalan.jar-apparent.version=xalan.jar WARNING.present-unknown-version
xalan.jar-path=/home/schier/ivs/mfjb_2002/xalan-j_2_5_1/bin/xalan.jar
#----- END Listing XML-related jars in: foundclasses.java.class.path -----
version.JAXP=1.1
java.ext.dirs=/usr/lib/SunJava2-1.4.1/jre/lib/ext
version.crimson=not-present
version.SAX=2.0
java.class.path=xalan-j_2_5_1/bin/xalan.jar
version.xerces=not-present
sun.boot.class.path=/usr/lib/SunJava2-1.4.1
/jre/lib/rt.jar:/usr/lib/SunJava2-1.4.1
/jre/lib/i18n.jar:/usr/lib/SunJava2-1.4.1
/jre/lib/sunrsasign.jar:/usr/lib/SunJava2-1.4.1
/jre/lib/jsse.jar:/usr/lib/SunJava2-1.4.1
/jre/lib/jce.jar:/usr/lib/SunJava2-1.4.1
/jre/lib/charsets.jar:/usr/lib/SunJava2-1.4.1/jre/classes
version.DOM.draftlevel=2.0fd
version.xalan2=Xalan;Java;Xalan Java 2.2.D11;
version.DOM=2.0
version.xalan1=not-present
#----- END writeEnvironmentReport: Useful properties found: -----
# YAHOO! Your environment seems to be OK.
[EMAIL PROTECTED]:~/ivs/mfjb_2002> java -cp xalan-j_2_5_1/bin/xalan.jar
org.apache.xalan.xslt.Process -IN test_authors.xml -XSL
test_tokenize_builtin.xsl |less
,
20012323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232
3232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323
23232323232323232323232323
[EMAIL PROTECTED]:~/ivs/mfjb_2002> cat test_tokenize_builtin.xsl
<?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>
<xsl:value-of select="."/>
</xsl:for-each>
</xsl:template>
</xsl:stylesheet>
[EMAIL PROTECTED]:~/ivs/mfjb_2002>
--
--------------------------------------------------
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]
--------------------------------------------------