Welcome, Guest! Log In | Create Account

Saxon on Eclipse

From saxon

Jump to: navigation, search

Configuring Saxon on Eclipse

  1. Add the Saxon jars to your classpath. Usually this id done by placing the files into your WEB-INF/lib directory, and then right-clicking on these files to add them to the buildpath.
  2. If you are using JAXP to access Saxon, add the appropriate JVM configuration parameters by using the JVM settings dialog. Use "-Djavax.xml.transform.TransformerFactory=com.saxonica.SchemaAwareTransformerFactory" for Saxon-SA or "-Djavax.xml.transform.TransformerFactory=net.sf.saxon.TransformerFactoryImpl" for Saxon-B. If you want to use Saxon to perform XPATH queries, you must also set "-Djavax.xml.xpath.XPathFactory=net.sf.saxon.xpath.XPathFactoryImpl".
  3. For Saxon-SA you must also add saxon-license.lic to a directory that is on the classpath. You can determine the classpath for your project by viewing .classpath in the root directory of your workspace. Usually you can just drag the license file into WEB-INF/src which should be on the classpath by default.
  4. Your application should now be configured to use the version of Saxon you specified. However, if you have installed an Eclipse editor plug-in that performs validation, you must separately configure it to use the same version of Saxon you configured for your application. See here to configure Saxon on Oxygen.

In order to make sure you have setup the version you think you have, verify saxon version.