public class EntityResolver2Wrapper extends java.lang.Object implements ExternalSubsetResolver
This class wraps a SAX entity resolver (EntityResolver2) in an XNI entity resolver.
Modifier and Type | Field and Description |
---|---|
protected org.xml.sax.ext.EntityResolver2 |
fEntityResolver
An instance of SAX2 Extensions 1.1's EntityResolver2.
|
Constructor and Description |
---|
EntityResolver2Wrapper()
Default constructor.
|
EntityResolver2Wrapper(org.xml.sax.ext.EntityResolver2 entityResolver)
Creates a new instance wrapping the given SAX entity resolver.
|
Modifier and Type | Method and Description |
---|---|
org.xml.sax.ext.EntityResolver2 |
getEntityResolver()
Returns the SAX entity resolver wrapped by this object.
|
org.apache.xerces.xni.parser.XMLInputSource |
getExternalSubset(org.apache.xerces.xni.grammars.XMLDTDDescription grammarDescription)
Locates an external subset for documents which do not explicitly
provide one.
|
org.apache.xerces.xni.parser.XMLInputSource |
resolveEntity(org.apache.xerces.xni.XMLResourceIdentifier resourceIdentifier)
Resolves an external parsed entity.
|
void |
setEntityResolver(org.xml.sax.ext.EntityResolver2 entityResolver)
Sets the SAX entity resolver wrapped by this object.
|
protected org.xml.sax.ext.EntityResolver2 fEntityResolver
public EntityResolver2Wrapper()
public EntityResolver2Wrapper(org.xml.sax.ext.EntityResolver2 entityResolver)
Creates a new instance wrapping the given SAX entity resolver.
entityResolver
- the SAX entity resolver to wrappublic void setEntityResolver(org.xml.sax.ext.EntityResolver2 entityResolver)
Sets the SAX entity resolver wrapped by this object.
entityResolver
- the SAX entity resolver to wrappublic org.xml.sax.ext.EntityResolver2 getEntityResolver()
Returns the SAX entity resolver wrapped by this object.
public org.apache.xerces.xni.parser.XMLInputSource getExternalSubset(org.apache.xerces.xni.grammars.XMLDTDDescription grammarDescription) throws org.apache.xerces.xni.XNIException, java.io.IOException
Locates an external subset for documents which do not explicitly
provide one. If no external subset is provided, this method should
return null
.
getExternalSubset
in interface ExternalSubsetResolver
grammarDescription
- a description of the DTDorg.apache.xerces.xni.XNIException
- Thrown on general error.java.io.IOException
- Thrown if resolved entity stream cannot be
opened or some other i/o error occurs.public org.apache.xerces.xni.parser.XMLInputSource resolveEntity(org.apache.xerces.xni.XMLResourceIdentifier resourceIdentifier) throws org.apache.xerces.xni.XNIException, java.io.IOException
resolveEntity
in interface org.apache.xerces.xni.parser.XMLEntityResolver
resourceIdentifier
- contains the physical co-ordinates of the resource to be resolvedorg.apache.xerces.xni.XNIException
- Thrown on general error.java.io.IOException
- Thrown if resolved entity stream cannot be
opened or some other i/o error occurs.XMLResourceIdentifier
Copyright © 1999-2022 The Apache Software Foundation. All Rights Reserved.