Thanks. It seems that the bug is now fixed in the latest saxon release. Thanks for your help.
Gilles > -----Original Message----- > From: James Abley [mailto:[EMAIL PROTECTED] > Sent: lundi 19 mars 2007 12:02 > To: Ant Users List > Subject: Re: Using XSLT2 > > Looks like an issue with Saxon. > > http://java.sun.com/j2se/1.5.0/docs/api/javax/xml/transform/TransformerFac > tory.html#newInstance() > > "Obtain a new instance of a TransformerFactory. This static method > creates a new factory instance This method uses the following ordered > lookup procedure to determine the TransformerFactory implementation > class to load: > > * Use the javax.xml.transform.TransformerFactory system property. > * Use the properties file "lib/jaxp.properties" in the JRE > directory. This configuration file is in standard java.util.Properties > format and contains the fully qualified name of the implementation class > with the key being the system property defined above. The > jaxp.properties file is read only once by the JAXP implementation and > it's values are then cached for future use. If the file does not exist > when the first attempt is made to read from it, no further attempts are > made to check for its existence. It is not possible to change the value > of any property in jaxp.properties after it has been read for the first > time. > * Use the Services API (as detailed in the JAR specification), if > available, to determine the classname. The Services API will look for a > classname in the file > META-INF/services/javax.xml.transform.TransformerFactory in jars > available to the runtime. > * Platform default TransformerFactory instance." > > And then checking with the more general JAR specification. > > http://java.sun.com/j2se/1.5.0/docs/guide/jar/jar.html#Service%20Provider > > "Files in the META-INF/services directory are service provider > configuration files." > > Cheers, > > James > > Gilles Scokart wrote: > > I also tried with a sun jdk 1.4 and ant 1.6.5, and I always got the same > > trace : "Couldn't load ResourceStream for > > META-INF/services/javax.xml.transform.TransformerFactory" > > > > Looking more closely, I found that my saxon8.jar download from > > http://prdownloads.sourceforge.net/saxon/saxonb8-9j.zip contains a file > > "META-INF/service/javax.xml.transform.TransformerFactory" instead of the > > (service without s). > > > > I hacked the saxon jar in order to have the > > javax.xml.transform.TransformerFactory where ant expect it, and it > worked. > > > > Which one is correct? ant or saxon? > > > > Gilles > > > > > > > > Gilles Scokart wrote: > >> > >> > >> I try to use the function 'lower-case' in an xslt transformation. This > >> function requires an XSLT2 engine, so I tried to use saxon as described > in > >> http://wiki.apache.org/ant/UsingAntWithXSLT20AndSaxon. > >> > >> I tried all approach > >> - Place saxon8.jar in the classpath attribute of the XSLT tarsk > >> - Place saxon8.jar as a child classpath element of the XSLT task > >> - Place it on the command line with the -lib option > >> - Place the jar in ANT_HOME/lib > >> > >> But it always failed. Xalan is never found. > >> > >> When I run my script in debug mode I see : > >> > >> Class org.apache.tools.ant.taskdefs.optional.TraXLiaison loaded from > >> parent > >> loader (parentFirst) > >> [xslt] Using class > org.apache.tools.ant.taskdefs.optional.TraXLiaison > >> [xslt] In file d:\dev\workspace_1.5\RAD7FullEAR\test.xml time: > >> 1174054857031 > >> [xslt] Out file d:\dev\workspace_1.5\RAD7FullEAR\target\ivy.xml > time: > >> 0 > >> [xslt] Style file ivy_template.xsl time: 1174061142023 > >> [xslt] Processing d:\dev\workspace_1.5\RAD7FullEAR\test.xml to > >> d:\dev\workspace_1.5\RAD7FullEAR\tar > >> get\ivy.xml > >> [xslt] Loading stylesheet > >> d:\dev\workspace_1.5\RAD7FullEAR\ivy_template.xsl > >> Couldn't load ResourceStream for > >> META-INF/services/javax.xml.transform.TransformerFactory > >> Class org.apache.xalan.processor.TransformerFactoryImpl loaded from > parent > >> loader (parentFirst) > >> > >> It seems that TraXLiaison is loaded from a parent loader that don't > have > >> the > >> saxon8.jar in his path > >> (META-INF/services/javax.xml.transform.TransformerFactory should be > loaded > >> from this jar). > >> > >> > >> I use ant 1.7 with an IBM jvm 1.5. in cygwin. You can find the ant > >> -diagnostic in attachment. > >> > >> > >> Can anyone help me? > >> > >> Thanks, > >> > >> Gilles Scokart > >> > >> > >> > >> ------- Ant diagnostics report ------- > >> Apache Ant version 1.7.0 compiled on December 13 2006 > >> > >> ------------------------------------------- > >> Implementation Version > >> ------------------------------------------- > >> core tasks : 1.7.0 > >> optional tasks : not available > >> > >> ------------------------------------------- > >> ANT PROPERTIES > >> ------------------------------------------- > >> ant.version: Apache Ant version 1.7.0 compiled on December 13 2006 > >> ant.java.version: 1.5 > >> ant.core.lib: c:\dev\bin\apache-ant-1.7.0\lib\ant.jar > >> ant.home: c:/dev/bin/apache-ant-1.7.0/ > >> > >> ------------------------------------------- > >> ANT_HOME/lib jar listing > >> ------------------------------------------- > >> ant.home: c:/dev/bin/apache-ant-1.7.0/ > >> ant-antlr.jar (5769 bytes) > >> ant-apache-bcel.jar (8627 bytes) > >> ant-apache-bsf.jar (3980 bytes) > >> ant-apache-log4j.jar (3074 bytes) > >> ant-apache-oro.jar (39591 bytes) > >> ant-apache-regexp.jar (3737 bytes) > >> ant-apache-resolver.jar (4080 bytes) > >> ant-commons-logging.jar (3943 bytes) > >> ant-commons-net.jar (47163 bytes) > >> ant-jai.jar (21368 bytes) > >> ant-javamail.jar (7011 bytes) > >> ant-jdepend.jar (8152 bytes) > >> ant-jmf.jar (6609 bytes) > >> ant-jsch.jar (30122 bytes) > >> ant-junit.jar (92792 bytes) > >> ant-launcher.jar (11734 bytes) > >> ant-netrexx.jar (9895 bytes) > >> ant-nodeps.jar (430311 bytes) > >> ant-starteam.jar (35404 bytes) > >> ant-stylebook.jar (2334 bytes) > >> ant-swing.jar (6713 bytes) > >> ant-testutil.jar (14919 bytes) > >> ant-trax.jar (6897 bytes) > >> ant-weblogic.jar (14254 bytes) > >> ant.jar (1289806 bytes) > >> junit.jar (121070 bytes) > >> saxon8.jar (3728517 bytes) > >> xercesImpl.jar (1212965 bytes) > >> xml-apis.jar (195119 bytes) > >> > >> ------------------------------------------- > >> USER_HOME/.ant/lib jar listing > >> ------------------------------------------- > >> user.home: C:\Documents and Settings\gscokart > >> No such directory. > >> > >> ------------------------------------------- > >> Tasks availability > >> ------------------------------------------- > >> image : Missing dependency javax.media.jai.PlanarImage > >> sshexec : Missing dependency com.jcraft.jsch.UserInfo > >> scp : Missing dependency com.jcraft.jsch.UserInfo > >> jdepend : Missing dependency jdepend.xmlui.JDepend > >> A task being missing/unavailable should only matter if you are trying > to > >> use it > >> > >> ------------------------------------------- > >> org.apache.env.Which diagnostics > >> ------------------------------------------- > >> Not available. > >> Download it at http://xml.apache.org/commons/ > >> > >> ------------------------------------------- > >> XML Parser information > >> ------------------------------------------- > >> > >> > >> --------------------------------------------------------------------- > >> To unsubscribe, e-mail: [EMAIL PROTECTED] > >> For additional commands, e-mail: [EMAIL PROTECTED] > >> > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
