org.apache.xml.resolver.tools
public class ResolvingParser extends Object implements Parser, DTDHandler, DocumentHandler, EntityResolver
Deprecated: This interface has been replaced by the ResolvingXMLReader for SAX2.
A SAX Parser that performs catalog-based entity resolution.
This class implements a SAX Parser that performs entity resolution using the CatalogResolver. The actual, underlying parser is obtained from a SAXParserFactory.
Version: 1.0
See Also: CatalogResolver org.xml.sax.Parser
Field Summary | |
---|---|
static boolean | namespaceAware Make the parser Namespace aware? |
static boolean | suppressExplanation Suppress explanatory message?
|
static boolean | validating Make the parser validating? |
Constructor Summary | |
---|---|
ResolvingParser() Constructor |
Method Summary | |
---|---|
void | characters(char[] ch, int start, int length) SAX DocumentHandler API |
void | endDocument() SAX DocumentHandler API |
void | endElement(String name) SAX DocumentHandler API |
Catalog | getCatalog() Return the Catalog being used |
void | ignorableWhitespace(char[] ch, int start, int length) SAX DocumentHandler API |
void | notationDecl(String name, String publicId, String systemId) SAX DTDHandler API |
void | parse(InputSource input) SAX Parser API Note that the JAXP 1.1ea2 parser crashes with an InternalError if it encounters a system identifier that appears to be a relative URI that begins with a slash. |
void | parse(String systemId) SAX Parser API
|
void | processingInstruction(String target, String pidata) SAX DocumentHandler API |
InputSource | resolveEntity(String publicId, String systemId) Implements the |
void | setDocumentHandler(DocumentHandler handler) SAX Parser API |
void | setDocumentLocator(Locator locator) SAX DocumentHandler API |
void | setDTDHandler(DTDHandler handler) SAX Parser API |
void | setEntityResolver(EntityResolver resolver) SAX Parser API The purpose of this class is to implement an entity resolver. |
void | setErrorHandler(ErrorHandler handler) SAX Parser API |
void | setLocale(Locale locale) SAX Parser API |
void | startDocument() SAX DocumentHandler API |
void | startElement(String name, AttributeList atts) SAX DocumentHandler API |
void | unparsedEntityDecl(String name, String publicId, String systemId, String notationName) SAX DTDHandler API |
See Also: parse
SAX Parser API
Note that the JAXP 1.1ea2 parser crashes with an InternalError if it encounters a system identifier that appears to be a relative URI that begins with a slash. For example, the declaration:
<!DOCTYPE book SYSTEM "/path/to/dtd/on/my/system/docbookx.dtd">
would cause such an error. As a convenience, this method catches that error and prints an explanation. (Unfortunately, it's not possible to identify the particular system identifier that causes the problem.)
The underlying error is forwarded after printing the explanatory
message. The message is only every printed once and if
suppressExplanation
is set to false
before
parsing, it will never be printed.
See Also: parse
Implements the resolveEntity
method
for the SAX interface, using an underlying CatalogResolver
to do the real work.
SAX Parser API
The purpose of this class is to implement an entity resolver. Attempting to set a different one is pointless (and ignored).