Package net.sf.saxon.lib
Class ChainedEntityResolver
- java.lang.Object
-
- net.sf.saxon.lib.ChainedEntityResolver
-
- All Implemented Interfaces:
org.xml.sax.EntityResolver
,org.xml.sax.ext.EntityResolver2
public class ChainedEntityResolver extends java.lang.Object implements org.xml.sax.ext.EntityResolver2
An EntityResolver that first tries one supplied EntityResolver, and if that returns null, falls back to another. Either EntityResolver may itself be aChainedEntityResolver
, so a chain of any length can be established.- Since:
- 11.1
-
-
Constructor Summary
Constructors Constructor Description ChainedEntityResolver(org.xml.sax.EntityResolver first, org.xml.sax.EntityResolver second)
Create a composite entity resolver
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.xml.sax.InputSource
getExternalSubset(java.lang.String name, java.lang.String baseURI)
org.xml.sax.InputSource
resolveEntity(java.lang.String publicId, java.lang.String systemId)
org.xml.sax.InputSource
resolveEntity(java.lang.String name, java.lang.String publicId, java.lang.String baseURI, java.lang.String systemId)
-
-
-
Constructor Detail
-
ChainedEntityResolver
public ChainedEntityResolver(org.xml.sax.EntityResolver first, org.xml.sax.EntityResolver second)
Create a composite entity resolver- Parameters:
first
- the first entity resolver to be usedsecond
- the entity resolver to be used if the first one returns null
-
-
Method Detail
-
resolveEntity
public org.xml.sax.InputSource resolveEntity(java.lang.String publicId, java.lang.String systemId) throws org.xml.sax.SAXException, java.io.IOException
- Specified by:
resolveEntity
in interfaceorg.xml.sax.EntityResolver
- Throws:
org.xml.sax.SAXException
java.io.IOException
-
getExternalSubset
public org.xml.sax.InputSource getExternalSubset(java.lang.String name, java.lang.String baseURI) throws org.xml.sax.SAXException, java.io.IOException
- Specified by:
getExternalSubset
in interfaceorg.xml.sax.ext.EntityResolver2
- Throws:
org.xml.sax.SAXException
java.io.IOException
-
resolveEntity
public org.xml.sax.InputSource resolveEntity(java.lang.String name, java.lang.String publicId, java.lang.String baseURI, java.lang.String systemId) throws org.xml.sax.SAXException, java.io.IOException
- Specified by:
resolveEntity
in interfaceorg.xml.sax.ext.EntityResolver2
- Throws:
org.xml.sax.SAXException
java.io.IOException
-
-