Oh, alright then. I guess that means that if I want to use the same XSLT to transform XML inside a servlet, I'll need to either create a new Transformer for every request, or synchronize a single transformer (or a combination approach with a pool of Transformers) right?
Thanks, Yuriy Zilbergleyt -----Original Message----- From: Morris Kwan [mailto:[EMAIL PROTECTED] Sent: Friday, December 12, 2003 11:36 AM To: Yuriy Zilbergleyt Cc: [EMAIL PROTECTED] Subject: RE: translets refuse to work with the evaluate() extension, both Xalan and exslt versions They are actually the same things, although you are allowed to use different namespace URIs. So xalan:evaluate() also does not work withXSLTC. Morris Kwan XSLT Development IBM Toronto Lab Tel: (905)413-3729 Email: [EMAIL PROTECTED] "Yuriy Zilbergleyt" <[EMAIL PROTECTED] To ltd.com> <[EMAIL PROTECTED]> cc 12/12/2003 11:31 AM Subject RE: translets refuse to work with the evaluate() extension, both Xalan and exslt versions Ok, that explains why dyn:evaluate() doesn't work. But what about xalan:evaluate()? Thanks, Yuriy Zilbergleyt -----Original Message----- From: Morris Kwan [mailto:[EMAIL PROTECTED] Sent: Friday, December 12, 2003 11:29 AM To: Yuriy Zilbergleyt Cc: [EMAIL PROTECTED] Subject: Re: translets refuse to work with the evaluate() extension, both Xalan and exslt versions The EXSLT dynamic extensions (e.g. evaluate) are not supported in XSLTC. Please see the following link for details: http://xml.apache.org/xalan-j/extensions_xsltc.html#exslt_ext Morris Kwan XSLT Development IBM Toronto Lab Tel: (905)413-3729 Email: [EMAIL PROTECTED] "Yuriy Zilbergleyt" <[EMAIL PROTECTED] To ltd.com> <[EMAIL PROTECTED]> cc 12/12/2003 10:53 AM Subject translets refuse to work with the evaluate() extension, both Xalan and exslt versions Hi, I?m trying to use xalan-j-2-5-2 to transform with an XSLT that uses the evaluate() extension. This works with the default transformer, but not with translets. Whenever I try to use a translet I get the error: 'Cannot find external method 'org.apache.xalan.lib.Extensions.evaluate' (must be public).' for xalan:evaluate(), and the error: 'The first argument to the non-static Java function 'evaluate' is not a valid object reference.' for dyn:evaluate(). Here are the XML and XSL files I wrote to test this: <?xml version='1.0' encoding='UTF-8'?> <TestElement> <data someAttribute="5"/> <data someAttribute="10"/> </TestElement> <xsl:stylesheet version = '1.0' xmlns:xsl='http://www.w3.org/1999/XSL/Transform' xmlns:xalan='http://xml.apache.org/xalan' xmlns:dyn="http://exslt.org/dynamic"> <xsl:template match="/"> <xsl:value-of select="xalan:evaluate('//TestElement/data[1]/@someAttribute')"/> <xsl:value-of select="dyn:evaluate('//TestElement/data[1]/@someAttribute')"/> </xsl:template> </xsl:stylesheet> For transforming without tranlets I used the SimpleTransform sample program that comes with xalan-j, and for tranlets I used JAXPTranletOneTransformation. I?m using J2SE 1.4.2 and J2EE 1.4 final, with the endorsed xalan jars. SimpleTransform works, JAXPTranletOneTransformation doesn?t, though it works if the evaluate() extension calls are taken out. Following is the result of running java org.apache.xalan.xslt.EnvironmentCheck: #---- BEGIN writeEnvironmentReport($Revision: 1.23 $): Useful stuff found: ---- version.DOM.draftlevel=2.0fd java.class.path=.\;C:\j2eesdk1.4\lib\j2ee.jar;C:\Program Files\Apache Group\Tomc at 4.1\webapps\Yuriy\WEB-INF\classes\;C:\Documents and Settings\yzilbergleyt\My Documents\MyJSP\Classes\;C:\Program Files\Apache Group\Tomcat 4.1 \common\lib\ser vlet.jar;C:\Documents and Settings\yzilbergleyt\My Documents\JavaClasses\;c:\tc; C:\Blazix\Blazix.jar;C:\xalan-j\xalan-j_2_5_2\bin\bsf.jar;C:\xalan-j\xal an-j_2_ 5_2\bin\xalan.jar;C:\xalan-j\xalan-j_2_5_2\bin\xalansamples.jar;C:\xalan -j\xalan -j_2_5_2\bin\xercesImpl.jar;C:\xalan-j\xalan-j_2_5_2\bin\xml-apis.jar; version.JAXP=1.1 or higher java.ext.dirs=C:\j2sdk_nb\j2sdk1.4.2\jre\lib\ext #---- BEGIN Listing XML-related jars in: foundclasses.sun.boot.class.path ---- xalan.jar-path=C:\j2sdk_nb\j2sdk1.4.2\jre\lib\endorsed\xalan.jar xercesImpl.jar-apparent.version=xercesImpl.jar from xerces-2_4 xercesImpl.jar-path=C:\j2sdk_nb\j2sdk1.4.2\jre\lib\endorsed\xercesImpl.j ar xml-apis.jar-apparent.version=xml-apis.jar present-unknown-version xml-apis.jar-path=C:\j2sdk_nb\j2sdk1.4.2\jre\lib\endorsed\xml-apis.jar #----- END Listing XML-related jars in: foundclasses.sun.boot.class.path ----- version.xerces2=Xerces-J 2.4.0 version.xerces1=not-present version.xalan2_2=Xalan Java 2.5.2 version.xalan1=not-present version.ant=not-present java.version=1.4.2 version.DOM=2.0 version.crimson=present-unknown-version sun.boot.class.path=C:\j2sdk_nb\j2sdk1.4.2 \jre\lib\endorsed\xalan.jar;C:\j2sdk_n b\j2sdk1.4.2\jre\lib\endorsed\xercesImpl.jar;C:\j2sdk_nb\j2sdk1.4.2 \jre\lib\endo rsed\xml-apis.jar;C:\j2sdk_nb\j2sdk1.4.2 \jre\lib\rt.jar;C:\j2sdk_nb\j2sdk1.4.2\j re\lib\i18n.jar;C:\j2sdk_nb\j2sdk1.4.2 \jre\lib\sunrsasign.jar;C:\j2sdk_nb\j2sdk1 .4.2\jre\lib\jsse.jar;C:\j2sdk_nb\j2sdk1.4.2 \jre\lib\jce.jar;C:\j2sdk_nb\j2sdk1. 4.2\jre\lib\charsets.jar;C:\j2sdk_nb\j2sdk1.4.2\jre\classes #---- BEGIN Listing XML-related jars in: foundclasses.java.class.path ---- xalan.jar-path=C:\xalan-j\xalan-j_2_5_2\bin\xalan.jar xalansamples.jar-apparent.version=xalansamples.jar present-unknown-version xalansamples.jar-path=C:\xalan-j\xalan-j_2_5_2\bin\xalansamples.jar xercesImpl.jar-apparent.version=xercesImpl.jar from xerces-2_4 xercesImpl.jar-path=C:\xalan-j\xalan-j_2_5_2\bin\xercesImpl.jar xml-apis.jar-apparent.version=xml-apis.jar present-unknown-version xml-apis.jar-path=C:\xalan-j\xalan-j_2_5_2\bin\xml-apis.jar #----- END Listing XML-related jars in: foundclasses.java.class.path ----- version.SAX=2.0 version.xalan2x=Xalan Java 2.5.2 #----- END writeEnvironmentReport: Useful properties found: ----- # YAHOO! Your environment seems to be OK. Please let me know if this is a bug, or if I'm doing something wrong. Thanks in advance! Yuriy Zilbergleyt