Ant errors
Having trouble installing Oxygen? Got a bug to report? Post it all here.
Ant errors
Hi, I had a transformation that used an Ant script to do a few things with a zip file and run a transformation on a XML file contained within. When I updated to v26 this script started throwing the following errors:
The warnings appear to be a known bug with JRE/Xerces - I don't know that it's causing the failure. However the XPath error I can't account for. If I change the 'eq' to just a '=', I get another odd XSL error about needing a select statement that's already there. Is your Ant configuration defaulting to Xerces for it's transformation engine? I get a similar sort of error about the 'eq' operator when I run the XSL using Xerces outside the Ant script. I tried to point to the Oxygen framework Saxon jar in the Ant script (using a classpath and XsltClassname), but your patched version doesn't seem to have net.sf.saxon.TransformerFactoryImpl, so wasn't sure how to configure otherwise.
Code: Select all
Processing C:\Users\seb9911\repositories\oxygen-frameworks\das-frameworks\ddmf\ddmf_package\examples\DOC_PDFC_TBC-TBX_D6-17370_20201005T070000Z_20201006T003033Z.ZIP ...
Warning: org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser: Property 'http://javax.xml.XMLConstants/property/accessExternalDTD' is not recognized.
Warning: org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser: Property 'http://www.oracle.com/xml/jaxp/properties/entityExpansionLimit' is not recognized.
...
Error parsing XPath expression 'meta[@property eq 'dms:priorPackageName']'.
Re: Ant errors
If you are not using a DITA-OT transformstion, you might not have Saxon HE on the classpath. You can add it like so:
Of course, you need to provide the saxon.jar file (Saxon HE). Afterwards you can use Saxon in an XSLT task like so:
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<project>
<path id="saxon">
<fileset dir="../../lib/">
<include name="saxon.jar"/>
</fileset>
</path>
</project>
Code: Select all
<xslt style="script.xsl"
in="input.xml"
out="output.xml"
failOnError="true">
<factory name="net.sf.saxon.TransformerFactoryImpl"/>
<classpath refid="saxon"/>
</xslt>
stefan-jung.org – Your DITA/DITA-OT XML consultant
Re: Ant errors
You find Saxon HE here: https://github.com/Saxonica/Saxon-HE/re ... axonHE12-4
stefan-jung.org – Your DITA/DITA-OT XML consultant
Re: Ant errors
Hi,
I agree with this being a problem in which the Saxon XSLT processor library is not properly loaded by the ANT build file.
If you have an Oxygen ANT transformation scenario that you are running maybe you can edit it and click the "Libraries" button to see what JAR libraries are used by it, then if Saxon JAR libraries are used directly from the Oxygen installation folder double check that the name of the Saxon JAR library has not changed between Oxygen released. For example Oxygen 26 comes with a JAR library named "oxygen-patched-saxon-12.jar" in its "OXYGEN_INSTALL_DIR/lib" folder. But older Oxygen versions contained an older version of Saxon, possibly Saxon 11 for example.
Regards,
Radu
I agree with this being a problem in which the Saxon XSLT processor library is not properly loaded by the ANT build file.
If you have an Oxygen ANT transformation scenario that you are running maybe you can edit it and click the "Libraries" button to see what JAR libraries are used by it, then if Saxon JAR libraries are used directly from the Oxygen installation folder double check that the name of the Saxon JAR library has not changed between Oxygen released. For example Oxygen 26 comes with a JAR library named "oxygen-patched-saxon-12.jar" in its "OXYGEN_INSTALL_DIR/lib" folder. But older Oxygen versions contained an older version of Saxon, possibly Saxon 11 for example.
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
Re: Ant errors
Thanks Radu, that got it - the Libraries included a path like ${oxygenHome}/lib/*saxon*11*.jar for saxon 9-11, but not one for 12. Adding one for 12 solved the problem. I'll have to keep an eye out for Saxon upgrades going forward. Thanks for the quick response as usual!
Scott
Scott
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ SDK-API, Frameworks - Document Types
- ↳ DocBook
- ↳ TEI
- ↳ XHTML
- ↳ Other Issues
- Oxygen XML Web Author
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Content Fusion
- ↳ Feature Request
- ↳ Common Problems
- Oxygen JSON Editor
- ↳ Feature Request
- ↳ Common Problems
- Oxygen PDF Chemistry
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Feedback
- ↳ Feature Request
- ↳ Common Problems
- Oxygen XML WebHelp
- ↳ Feature Request
- ↳ Common Problems
- XML
- ↳ General XML Questions
- ↳ XSLT and FOP
- ↳ XML Schemas
- ↳ XQuery
- NVDL
- ↳ General NVDL Issues
- ↳ oNVDL Related Issues
- XML Services Market
- ↳ Offer a Service