Re: [xsl] RE: Saxon via Ant - Getting started

Subject: Re: [xsl] RE: Saxon via Ant - Getting started
From: davep <davep@xxxxxxxxxxxxx>
Date: Wed, 30 Jan 2013 15:47:58 +0000
Below, xslt 1 and 2 using saxon for docbook
I'm sure you  can work out the paths and libraries for your setup.

HTH DaveP

 <java classname="${xslt1_processor}"
    fork="yes"
    dir="${in_dir}"
    failonerror="true">
    <classpath refid="xslt1.processor.classpath" />

<jvmarg line="-Xmx1024M -Xms1024M"/>

<jvmarg line="-Dorg.apache.xerces.xni.parser.XMLParserConfiguration=org.apache.xerces.parsers.XIncludeParserConfiguration"/>
<jvmarg line="-Djavax.xml.parsers.DocumentBuilderFactory=org.apache.xerces.jaxp.DocumentBuilderFactoryImpl"/>
<jvmarg line="-Djavax.xml.parsers.SAXParserFactory=org.apache.xerces.jaxp.SAXParserFactoryImpl"/>


<jvmarg line="-Dorg.apache.xerces.xni.parser.XMLParserConfiguration=org.apache.xerces.parsers.XIncludeParserConfiguration"/>

<arg line="-x org.apache.xml.resolver.tools.ResolvingXMLReader"/>
<arg line="-y org.apache.xml.resolver.tools.ResolvingXMLReader"/>
<arg line="-r org.apache.xml.resolver.tools.CatalogResolver "/>
<arg value="-l"/>
<arg value="-o"/>
<arg value="${out_dir}/${main_outfile}"/>
<!-- stylesheet is docbook.html.xsl -->
<arg line="${in_dir}/${main_expanded} ${html_stylesheet} ${param_args_post}" />


</java>

and 2

<java classname="${xslt2.processor.class}"
fork="yes"
dir="${schema.dir}"
failonerror="true">
<classpath refid="xslt2.processor.classpath" />
<jvmarg line="-Dorg.apache.xerces.xni.parser.XMLParserConfiguration=org.apache.xerces.parsers.XIncludeParserConfiguration"/>
<jvmarg line="-Djavax.xml.parsers.DocumentBuilderFactory=org.apache.xerces.jaxp.DocumentBuilderFactoryImpl"/>
<jvmarg line="-Djavax.xml.parsers.SAXParserFactory=org.apache.xerces.jaxp.SAXParserFactoryImpl"/>


    <arg value="-l"/>
    <arg value="-o"/>
    <arg value="../docs/nvdlschema.xml"/>
    <arg line="-x org.apache.xml.resolver.tools.ResolvingXMLReader"/>
    <arg line="-y org.apache.xml.resolver.tools.ResolvingXMLReader"/>
    <arg line="-r org.apache.xml.resolver.tools.CatalogResolver "/>
    <arg line="${schema.dir}/nvdl.xweb ${xsl.dir}/xweb2docbook4.xsl" />
  </java>

with

 <path id="xslt2.processor.classpath">
  <pathelement path="/myjava/saxon9.jar"/>  <!-- Saxon jar -->
  <pathelement path="/myjava/resolver.jar"/> <!-- resolver jar -->
  <pathelement path="${websiteHome}/extensions/saxon65.jar"/>
  <pathelement path="/myjava/xercesImpl.jar"/>
  <pathelement path="/sgml"/> <!-- for catalogManager.properties -->
  <pathelement path="."/>
 </path>

Current Thread