xsl-list
[Top] [All Lists]

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

2009-12-14 10:06:08
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

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--


--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

<Prev in Thread] Current Thread [Next in Thread>