Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 9 Next »

For the DLP Infrastructure Project, we have not yet defined a set of supported versions of various libraries, but here is what is currently in use:

  • Tomcat 5.5, with the following flags:
    • -Djavax.xml.parsers.DocumentBuilderFactory=org.apache.xerces.jaxp.DocumentBuilderFactoryImpl
      • I've also tried net.sf.saxon.om.DocumentBuilderFactoryImpl, but it failed. Perhaps it was only a missing jar – I didn't look into it at all (yet).
    • -Djavax.xml.parsers.SAXParserFactory=org.apache.xerces.jaxp.SAXParserFactoryImpl
    • -Djavax.xml.transform.TransformerFactory=net.sf.saxon.TransformerFactoryImpl
    • -Djavax.xml.xpath.XPathFactory=net.sf.saxon.xpath.XPathFactoryImpl
    • -Xmx1536M

Beware that even though javax.xml.xpath.XPathFactory is set to net.sf.saxon.xpath.XPathFactoryImpl, you must instantiate the Saxon XPath Factory with the NamespaceConstant.OBJECT_MODEL_SAXON parameter. However, an error occurs when using that parameter without setting a certain property first, I'm not sure why.

The normal operation:
XPathFactory factory = XPathFactory.newInstance();

just won't cut it, you must use:
System.setProperty("javax.xml.xpath.XPathFactory:"
+ net.sf.saxon.om.NamespaceConstant.OBJECT_MODEL_SAXON,
"net.sf.saxon.xpath.XPathFactoryImpl");

XPathFactory factory = XPathFactory.newInstance(NamespaceConstant.OBJECT_MODEL_SAXON);

for Saxon to operate properly.

  • No labels