[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: xslt task in Ant: the classpath attribute

Subject: Re: xslt task in Ant: the classpath attribute
From: Michael Schäfer <michael.schaefer@xxxxxxxxxxx>
Date: Mon, 14 Dec 2009 16:05:24 +0100
Re:  xslt task in Ant: the classpath attribute
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, init.build" 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"
		in="${framework.jpa}/template.persistence.xml"
		out="${work}/META-INF/persistence.xml"
		classpath="${xslt.engine}"
		force="true"
		>
		<param name="config.dir" expression="${user.config.out}"/>
	</xslt>
	<copy file="${framework.jpa}/persistence_1_0.xsd" todir="${work}/META-INF"
		 preservelastmodified="true"
	/>
	<record name="${logs}/deploy.create-jpa-config.log" action="stop"/>
</target>

${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:

http://www.abbeyworkshop.com/howto/xslt/ant-saxon/index.html

HTH,

Michael


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

<xslt classpath="e:/saxon-build/9.2.0.3/hej/saxon9he.jar"

?

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.

Regards,

Michael Kay
http://www.saxonica.com/
http://twitter.com/michaelhkay

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.