Package org.apache.daffodil.api
Class DaffodilXMLEntityResolver
java.lang.Object
org.apache.daffodil.api.DaffodilXMLEntityResolver
Returns the EntityResolver used by Daffodil to resolve import/include
schemaLocations.
The entity resolver attempts to resolve namespaces and systemId's in the following order:
1. Use an org.apache.xml.resolver.Catalog/CatalogManager. By default the Catalog only includes the daffodil-built-in-catalog.xml, but additional catalogs can be added by putting CatalogManager.properties on the classpath when daffodil is run.
2. If not resolved in step 1, schemaLocations are resolved relative to the importing schema URI, which could either be a file on the filesystem or in a jar on the classpath.
The EntityResolver isn't thread safe, but it also is expensive and stateful, so we use ThreadLocal to only create one instance per thread.
-
Method Summary
Modifier and TypeMethodDescriptionstatic EntityResolver
static LSResourceResolver
static org.apache.xerces.xni.parser.XMLEntityResolver
-
Method Details
-
getEntityResolver
- Returns:
- entity resolver
-
getXMLEntityResolver
public static org.apache.xerces.xni.parser.XMLEntityResolver getXMLEntityResolver()- Returns:
- xml entity resolver
-
getLSResourceResolver
- Returns:
- ls resource resolver
-