Chapter 3Getting an XML Resolver

The XML Resolver is distributed in two ways: you can get it as a release from GitHub, or you can get it from Maven with coordinates like these:

 1 |<dependency>
   |  <groupId>org.xmlresolver</groupId>
   |  <artifactId>xmlresolver</artifactId>
   |  <version>3.1.6</version>
 5 |</dependency>
   | 
   |<dependency>
   |  <groupId>org.xmlresolver</groupId>
   |  <artifactId>xmlresolver</artifactId>
10 |  <version>3.1.6</version>
   |  <classifier>data</classifier>
   |</dependency>

Place the XML Resolver jar file on your classpath to use the resolver. If you also place the “data” jar file on your classpath, you will automatically get local resolution of a large number of open source schemas and DTDs. (These are mostly from the W3C for the reasons described above.)

Other distributions can also take advantage of this automatic behavior by placing a catalog file at org/xmlresolver/catalog.xml in the jar file. For example, the DocBook schemas and xslTNG releases do this. Simply placing those jar files in your classpath will make catalog resolution of the standard URIs quick and efficient.