Re: [xsl] xslt task in Ant: the classpath attribute

Subject: Re: [xsl] xslt task in Ant: the classpath attribute
From: Michael Schäfer <michael.schaefer@xxxxxxxxxxx>
Date: Mon, 14 Dec 2009 16:05:24 +0100
Hi Michael,

yes, we're using it with Ant 1.7.1 in Eclipse 3.4:

<!-- Create JPA config file -->
<target name="createJpaConfigFile" depends="init," description="Creates the JPA config file persistence.xml">
	<record name="${logs}/deploy.create-jpa-config.log" action="start" loglevel="verbose"/>
	<echo message="${SAXONBOILERPLATE}"/>
	<xslt style="${framework.jpa}/makePersistenceXml.xsl"
		<param name="config.dir" expression="${user.config.out}"/>
	<copy file="${framework.jpa}/persistence_1_0.xsd" todir="${work}/META-INF"
	<record name="${logs}/deploy.create-jpa-config.log" action="stop"/>

${xslt.engine} points to the saxon9.jar in WEB-INF/lib. It seems to work,
if we remove the classpath entry, we got lots of syntax errors (the
stylesheets are XSLT 2.0 and use XSLT 2.0 stuff like sequence constructors).

I got the hint from there:



Michael Kay schrieb:
Does anyone use the classpath attribute of the xslt task in Ant, for example

<xslt classpath="e:/saxon-build/"


According to the documentation, the TransformerFactory is loaded using this
classpath. But I have never been able to make it work. I have to specify the
classpath in the -lib option when invoking ant from the command line.


Michael Kay

Current Thread