Using SAXON EE License in ANT Transformation

Here should go questions about transforming XML with XSLT and FOP.
jonas
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="-r:org.apache.xml.resolver.tools.CatalogResolver"/>
            <arg value="-x:org.apache.xml.resolver.tools.ResolvingXMLReader"/>
            <arg value="-y:org.apache.xml.resolver.tools.ResolvingXMLReader"/>
            <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}"/>
        </java>


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,
Jonas
adrian
Posts: 2388

Re: Using SAXON EE License in ANT Transformation

Mon Jan 09, 2017 11:48 am

Hi,

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

classpath="${oxyFolder}\lib\oxygen.jar;${oxyFolder}\lib\saxon9ee.jar;${oxyFolder}\lib\log4j.jar;${oxyFolder}\lib\xercesImpl.jar;${oxyFolder}\lib\resolver.jar"
I would also recommend using fork="true", or you'll get some security exceptions.

Regards,
Adrian
Adrian Buza
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com

Return to “XSLT and FOP”

Who is online

Users browsing this forum: No registered users and 1 guest