How to use newest Saxon from ant transformation scenario?
Posted: Sat May 01, 2021 7:15 pm
Hi,
This subject is already asked many times before, however I cannot use the newest Saxon 10.3 from my ant transformation scenario with Oxygen 23.1.
Here is the build file. I downloaded external Saxon add-on and it was successfully downloaded.
The output log:
Saxon 10.3 does not recognize the license file and my XSLT stylesheet does not work at all.
Could you tell me some directions about this problem?
Regards,
This subject is already asked many times before, however I cannot use the newest Saxon 10.3 from my ant transformation scenario with Oxygen 23.1.
Here is the build file. I downloaded external Saxon add-on and it was successfully downloaded.
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<project basedir="." name="build.attr.gen" default="attr.gen">
<target name="attr.gen">
<!-- ucd.all.flat.xml -->
<property name="source.file" value="${basedir}${file.separator}..${file.separator}ucd.xml${file.separator}ucd.all.flat.xml"/>
<makeurl property="source.file.url" file="${source.file}" validate="yes"/>
<property name="dest.file" value="${basedir}${file.separator}attrlist.csv"/>
<echo message="<root/>" file="${basedir}${file.separator}dummy.xml"/>
<property name="dummy.file" value="${basedir}${file.separator}dummy.xml"/>
<!-- XSLT Transformation Class Name -->
<property name="transformer.classname" value="net.sf.saxon.Transform"/>
<property name="prmInputFile" value="${dummy.file}"/>
<property name="prmOutputFile" value="${dest.file}"/>
<property name="prmStylesheetFile" value="${basedir}${file.separator}xsl${file.separator}gen_attr_list.xsl"/>
<property name="oxyLibFolder" value="C:\PROGRA~1\OXYGEN~3.1\lib"/>
<property name="oxyAntLibFolder" value="C:\PROGRA~1\OXYGEN~3.1\tools\ant\lib"/>
<property name="saxonJar" value="C:\Users\toshi\AppData\Roaming\com.oxygenxml\extensions\v23.1\plugins\https_www.oxygenxml.com_InstData_Addons_default_updateSite.xml\oxygen-sample-plugin-transformer-saxon-10-0-23.1\lib\saxon-ee-10.0.jar"/>
<property name="classpath" value="${oxyLibFolder}\oxygen.jar;${oxyLibFolder}\oxygen-basic-utilities.jar;${saxonJar};${oxyLibFolder}\log4j*.jar;${oxyAntLibFolder}\ant-apache-resolver.jar"/>
<echo message="classpath=${classpath}"/>
<java classname="net.sf.saxon.Transform" classpath="${classpath}">
<arg value="-config:${basedir}${file.separator}saxon-config.xml"/>
<arg value="-xsl:${prmStylesheetFile}"/>
<arg value="-s:${dummy.file}"/>
<arg value="-o:${dest.file}"/>
<arg value="-t"/>
<arg value="PRM_ATT_FILE_URL=${source.file.url}"/>
</java>
</target>
</project>
Code: Select all
Executing:
"c:\program files\oxygen xml editor 23.1\jre/bin/java" -Dfile.encoding=UTF-8 -Xmx256m -Djava.awt.headless=true -classpath "C:\Program Files\Oxygen XML Editor 23.1\tools\ant/lib/ant-launcher.jar" "-Dant.home=C:\Program Files\Oxygen XML Editor 23.1\tools\ant" org.apache.tools.ant.launch.Launcher -f "build.xml" "-Dwebhelp.trial.license=no"
Buildfile: D:\My_Documents\download\UCD\attr-gen\build.xml
attr.gen:
[echo] classpath=C:\PROGRA~1\OXYGEN~3.1\lib\oxygen.jar;C:\PROGRA~1\OXYGEN~3.1\lib\oxygen-basic-utilities.jar;C:\Users\toshi\AppData\Roaming\com.oxygenxml\extensions\v23.1\plugins\https_www.oxygenxml.com_InstData_Addons_default_updateSite.xml\oxygen-sample-plugin-transformer-saxon-10-0-23.1\lib\saxon-ee-10.0.jar;C:\PROGRA~1\OXYGEN~3.1\lib\log4j*.jar;C:\PROGRA~1\OXYGEN~3.1\tools\ant\lib\ant-apache-resolver.jar
[java] Saxon-EE 10.3J from Saxonica
[java] Java version 15.0.1
[java] No license file found - running with licensable features disabled
[java] URIResolver.resolve href="ahf_util_string.xsl" base="file:/D:/My_Documents/download/UCD/attr-gen/xsl/gen_attr_list.xsl"
[java] Warning at xsl:mode on line 18 column 49 of gen_attr_list.xsl:
[java] SXST0068 Request for streaming ignored: this Saxon configuration does not support streaming
[java] Warning at xsl:source-document on line 47 column 70 of gen_attr_list.xsl:
[java] SXST0068 Request for streaming ignored: this Saxon configuration does not support streaming
[java] Stylesheet compilation time: 649.0473ms
[java] Processing file:/D:/My_Documents/download/UCD/attr-gen/dummy.xml
[java] Using parser com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser
[java] Building tree for file:/D:/My_Documents/download/UCD/attr-gen/dummy.xml using class net.sf.saxon.tree.tiny.TinyBuilder
[java] Tree built in 0.2304ms
[java] Tree size: 3 nodes, 0 characters, 0 attributes
[java] Execution time: 22.6426ms
[java] Memory used: 23Mb
BUILD SUCCESSFUL
Total time: 1 second
The process finished with exit code: 0
Could you tell me some directions about this problem?
Regards,