Hi Mike, just in case you can do a better job of spotting my Typos here are the targets:


  <target name="set.saxon.properties" depends="-pre-init">

    <property name="saxon.jar" location="${root.dir}/Bin/saxon9.jar"/>

    <property name="saxon-ant.jar" location="${root.dir}/Bin/saxon9-ant.jar"/>

    <pst:FileExistCheck file.property="saxon.jar"/>

    <pst:FileExistCheck file.property="saxon-ant.jar"/>

    <taskdef name="saxon-xslt" classname="net.sf.saxon.ant.AntTransform"



  <target name="SaxonTransform" depends="set_flags,set.saxon.properties" description="Run ${XSLFile} using Saxon against an ${XMLFile} results in ${OutFile}">

    <property name="xml.file" location="${XMLFile}"/>

    <pst:FileExistCheck file.property="xml.file"/>

    <property name="xsl.file" location="${XSLFile}"/>

    <pst:FileExistCheck file.property="xsl.file"/>

    <tempfile property="temp.file" suffix=".xml"/>

    <condition property="OutFile" value="${temp.file}">


        <isset property="OutFile"/>



    <property name="out.file" location="${OutFile}"/>

    <saxon-xslt in="${xml.file}" out="${out.file}" filenameparameter="filename" style="${xsl.file}" force="true" classpath="${saxon.jar}">

      <classpath location="${saxon.jar}"/>

      <param name="http://saxon.sf.net/feature/traceListenerClass" expression="net.sf.trace.XSLTTraceListener"/>

      <param name="debugparam" expression="${optionDebug}"/>


    <fixcrlf file="${out.file}"/>

    <echo level="info"

          message="debugparam set to &#34;${optionDebug}&#34;"/>

    <echo level="info"

          message="SaxonTransform from XMLFile=&#34;${XMLFile}&#34; using stylesheet XSLFile=&#34;${XSLFile}&#34; to OutFile=&#34;${out.file}&#34;"/>



Cheers Graham


From: Michael Kay [mailto:mike@saxonica.com]
Sent: Friday, December 11, 2009 10:53 PM
To: 'Mailing list for the SAXON XSLT and XQuery processor'
Subject: Re: [saxon] saxon9-ant.jar options


Hi Graham, sorry for the delay in responding.


If you are using the ant xslt task, or the Saxon AntTransform task derived from it, then the equivalent to the -T option on the command line is (in theory) to use a nested element


<attribute name=http://saxon.sf.net/feature/traceListenerClass"



I haven't actually tried it.


From: Heath, Graham [mailto:graham.heath@ts.fujitsu.com]
Sent: 08 December 2009 17:09
To: saxon-help@lists.sourceforge.net
Subject: [saxon] saxon9-ant.jar options

Hi guys, I am running the saxon9-ant.jar to invoke saxon from my ant script. The problem is that I wanted to activate the trace option and so far I have not stumbled on the right invocation.


Any help gratefully received.


Ciao Graham