Using SAXON EE License in ANT Transformation

Here should go questions about transforming XML with XSLT and FOP.
Posts: 5

Using SAXON EE License in ANT Transformation

Thu Jan 05, 2017 8:10 pm

Hi all,

I have an ANT with multiple target. I'm running the ANT transformation in oXygen (18.0) using an ANT Transformation Scenario.
The ANT file contains the following Java task to start an XSL transformation with Saxon EE:

Code: Select all

        <java classname="net.sf.saxon.Transform" classpath="${oxyFolder}\lib\saxon9ee.jar; ${oxyFolder}\lib\resolver.jar" clonevm="true">
            <arg value=""/>
            <arg value=""/>
            <arg value=""/>
            <arg value="-it:createFile"/>
            <arg value="-xsl:xslt${file.separator}collectElementIDs.xsl"/>
            <arg value="-t"/>
            <arg value="-val:lax"/>
            <arg value="TOPICLIST=${TopicFiles}"/>
            <arg value="OUTFOLDER=${outFolder}"/>

The {oxyFolder} variable points to the oXygen installation directory.
The XSL transformation works, but I get the following notification: [java] No license file found - running with licensable features disabled.

I know that the Saxon EE license from oXygen is not available, when I run the ANT file outside oXygen. But can I use the Saxon EE license when I run an ANT transformation scenario in oXygen?

Best regards,
Posts: 2388

Re: Using SAXON EE License in ANT Transformation

Mon Jan 09, 2017 11:48 am


The classpath needs to specify the oxygen.jar (or oxygenAuthor.jar, or oxygenDeveloper.jar) before saxon9ee.jar, in order for the Saxon-EE license to work. In addition Oxygen requires a few additional jars, xercesImpl.jar, log4j.jar. So, your classpath would look like this:

Code: Select all

I would also recommend using fork="true", or you'll get some security exceptions.

Adrian Buza
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger

Return to “XSLT and FOP”

Who is online

Users browsing this forum: No registered users and 1 guest