Class ResolvingParser
- All Implemented Interfaces:
DocumentHandler
,DTDHandler
,EntityResolver
,Parser
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
- Author:
- Norman Walsh Norman.Walsh@Sun.COM
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic boolean
Deprecated.Make the parser Namespace aware?static boolean
Deprecated.Suppress explanatory message?static boolean
Deprecated.Make the parser validating? -
Constructor Summary
ConstructorsConstructorDescriptionDeprecated.Constructor.ResolvingParser
(CatalogManager manager) Deprecated.Constructor. -
Method Summary
Modifier and TypeMethodDescriptionvoid
characters
(char[] ch, int start, int length) Deprecated.SAX DocumentHandler API.void
Deprecated.SAX DocumentHandler API.void
endElement
(String name) Deprecated.SAX DocumentHandler API.Deprecated.Return the Catalog being used.void
ignorableWhitespace
(char[] ch, int start, int length) Deprecated.SAX DocumentHandler API.void
notationDecl
(String name, String publicId, String systemId) Deprecated.SAX DTDHandler API.void
Deprecated.SAX Parser API.void
parse
(InputSource input) Deprecated.SAX Parser API.void
processingInstruction
(String target, String pidata) Deprecated.SAX DocumentHandler API.resolveEntity
(String publicId, String systemId) Deprecated.Implements theresolveEntity
method for the SAX interface, using an underlying CatalogResolver to do the real work.void
setDocumentHandler
(DocumentHandler handler) Deprecated.SAX Parser API.void
setDocumentLocator
(Locator locator) Deprecated.SAX DocumentHandler API.void
setDTDHandler
(DTDHandler handler) Deprecated.SAX Parser API.void
setEntityResolver
(EntityResolver resolver) Deprecated.SAX Parser API.void
setErrorHandler
(ErrorHandler handler) Deprecated.SAX Parser API.void
Deprecated.SAX Parser API.void
Deprecated.SAX DocumentHandler API.void
startElement
(String name, AttributeList atts) Deprecated.SAX DocumentHandler API.void
unparsedEntityDecl
(String name, String publicId, String systemId, String notationName) Deprecated.SAX DTDHandler API.
-
Field Details
-
namespaceAware
public static boolean namespaceAwareDeprecated.Make the parser Namespace aware? -
validating
public static boolean validatingDeprecated.Make the parser validating? -
suppressExplanation
public static boolean suppressExplanationDeprecated.Suppress explanatory message?- See Also:
-
-
Constructor Details
-
ResolvingParser
public ResolvingParser()Deprecated.Constructor. -
ResolvingParser
Deprecated.Constructor.
-
-
Method Details
-
getCatalog
Deprecated.Return the Catalog being used. -
parse
Deprecated.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 tofalse
before parsing, it will never be printed.- Specified by:
parse
in interfaceParser
- Throws:
IOException
SAXException
-
parse
Deprecated.SAX Parser API.- Specified by:
parse
in interfaceParser
- Throws:
IOException
SAXException
- See Also:
-
setDocumentHandler
Deprecated.SAX Parser API.- Specified by:
setDocumentHandler
in interfaceParser
-
setDTDHandler
Deprecated.SAX Parser API.- Specified by:
setDTDHandler
in interfaceParser
-
setEntityResolver
Deprecated.SAX Parser API.The purpose of this class is to implement an entity resolver. Attempting to set a different one is pointless (and ignored).
- Specified by:
setEntityResolver
in interfaceParser
-
setErrorHandler
Deprecated.SAX Parser API.- Specified by:
setErrorHandler
in interfaceParser
-
setLocale
Deprecated.SAX Parser API.- Specified by:
setLocale
in interfaceParser
- Throws:
SAXException
-
characters
Deprecated.SAX DocumentHandler API.- Specified by:
characters
in interfaceDocumentHandler
- Throws:
SAXException
-
endDocument
Deprecated.SAX DocumentHandler API.- Specified by:
endDocument
in interfaceDocumentHandler
- Throws:
SAXException
-
endElement
Deprecated.SAX DocumentHandler API.- Specified by:
endElement
in interfaceDocumentHandler
- Throws:
SAXException
-
ignorableWhitespace
Deprecated.SAX DocumentHandler API.- Specified by:
ignorableWhitespace
in interfaceDocumentHandler
- Throws:
SAXException
-
processingInstruction
Deprecated.SAX DocumentHandler API.- Specified by:
processingInstruction
in interfaceDocumentHandler
- Throws:
SAXException
-
setDocumentLocator
Deprecated.SAX DocumentHandler API.- Specified by:
setDocumentLocator
in interfaceDocumentHandler
-
startDocument
Deprecated.SAX DocumentHandler API.- Specified by:
startDocument
in interfaceDocumentHandler
- Throws:
SAXException
-
startElement
Deprecated.SAX DocumentHandler API.- Specified by:
startElement
in interfaceDocumentHandler
- Throws:
SAXException
-
notationDecl
Deprecated.SAX DTDHandler API.- Specified by:
notationDecl
in interfaceDTDHandler
- Throws:
SAXException
-
unparsedEntityDecl
public void unparsedEntityDecl(String name, String publicId, String systemId, String notationName) throws SAXException Deprecated.SAX DTDHandler API.- Specified by:
unparsedEntityDecl
in interfaceDTDHandler
- Throws:
SAXException
-
resolveEntity
Deprecated.Implements theresolveEntity
method for the SAX interface, using an underlying CatalogResolver to do the real work.- Specified by:
resolveEntity
in interfaceEntityResolver
-
ResolvingXMLReader
for SAX2.