java.lang.Object
io.sf.carte.doc.xml.dtd.StackedEntityResolver
- All Implemented Interfaces:
EntityResolver
,EntityResolver2
A
EntityResolver2
that uses a main resolver and a fallback.
First, it attempts to resolve with the main resolver, if an exception is
thrown or null
is returned, then the fallback is used.
If the first resolver threw a SAXException
and the fallback one
returned null
, that first exception is thrown, as it may contain
relevant information.
-
Constructor Summary
ConstructorDescriptionStackedEntityResolver
(EntityResolver2 firstResolver, EntityResolver2 fallbackResolver) Construct a resolver with the two stacked resolvers. -
Method Summary
Modifier and TypeMethodDescriptiongetExternalSubset
(String name, String baseURI) final InputSource
resolveEntity
(String publicId, String systemId) final InputSource
resolveEntity
(String name, String publicId, String baseURI, String systemId)
-
Constructor Details
-
StackedEntityResolver
Construct a resolver with the two stacked resolvers.
-
-
Method Details
-
getExternalSubset
- Specified by:
getExternalSubset
in interfaceEntityResolver2
- Throws:
SAXException
IOException
-
resolveEntity
public final InputSource resolveEntity(String name, String publicId, String baseURI, String systemId) throws SAXException, IOException - Specified by:
resolveEntity
in interfaceEntityResolver2
- Throws:
SAXException
IOException
-
resolveEntity
public final InputSource resolveEntity(String publicId, String systemId) throws SAXException, IOException - Specified by:
resolveEntity
in interfaceEntityResolver
- Throws:
SAXException
IOException
-