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 booleanDeprecated.Make the parser Namespace aware?static booleanDeprecated.Suppress explanatory message?static booleanDeprecated.Make the parser validating? -
Constructor Summary
ConstructorsConstructorDescriptionDeprecated.Constructor.ResolvingParser(CatalogManager manager) Deprecated.Constructor. -
Method Summary
Modifier and TypeMethodDescriptionvoidcharacters(char[] ch, int start, int length) Deprecated.SAX DocumentHandler API.voidDeprecated.SAX DocumentHandler API.voidendElement(String name) Deprecated.SAX DocumentHandler API.Deprecated.Return the Catalog being used.voidignorableWhitespace(char[] ch, int start, int length) Deprecated.SAX DocumentHandler API.voidnotationDecl(String name, String publicId, String systemId) Deprecated.SAX DTDHandler API.voidDeprecated.SAX Parser API.voidparse(InputSource input) Deprecated.SAX Parser API.voidprocessingInstruction(String target, String pidata) Deprecated.SAX DocumentHandler API.resolveEntity(String publicId, String systemId) Deprecated.Implements theresolveEntitymethod for the SAX interface, using an underlying CatalogResolver to do the real work.voidsetDocumentHandler(DocumentHandler handler) Deprecated.SAX Parser API.voidsetDocumentLocator(Locator locator) Deprecated.SAX DocumentHandler API.voidsetDTDHandler(DTDHandler handler) Deprecated.SAX Parser API.voidsetEntityResolver(EntityResolver resolver) Deprecated.SAX Parser API.voidsetErrorHandler(ErrorHandler handler) Deprecated.SAX Parser API.voidDeprecated.SAX Parser API.voidDeprecated.SAX DocumentHandler API.voidstartElement(String name, AttributeList atts) Deprecated.SAX DocumentHandler API.voidunparsedEntityDecl(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
suppressExplanationis set tofalsebefore parsing, it will never be printed.- Specified by:
parsein interfaceParser- Throws:
IOExceptionSAXException
-
parse
Deprecated.SAX Parser API.- Specified by:
parsein interfaceParser- Throws:
IOExceptionSAXException- See Also:
-
setDocumentHandler
Deprecated.SAX Parser API.- Specified by:
setDocumentHandlerin interfaceParser
-
setDTDHandler
Deprecated.SAX Parser API.- Specified by:
setDTDHandlerin 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:
setEntityResolverin interfaceParser
-
setErrorHandler
Deprecated.SAX Parser API.- Specified by:
setErrorHandlerin interfaceParser
-
setLocale
Deprecated.SAX Parser API.- Specified by:
setLocalein interfaceParser- Throws:
SAXException
-
characters
Deprecated.SAX DocumentHandler API.- Specified by:
charactersin interfaceDocumentHandler- Throws:
SAXException
-
endDocument
Deprecated.SAX DocumentHandler API.- Specified by:
endDocumentin interfaceDocumentHandler- Throws:
SAXException
-
endElement
Deprecated.SAX DocumentHandler API.- Specified by:
endElementin interfaceDocumentHandler- Throws:
SAXException
-
ignorableWhitespace
Deprecated.SAX DocumentHandler API.- Specified by:
ignorableWhitespacein interfaceDocumentHandler- Throws:
SAXException
-
processingInstruction
Deprecated.SAX DocumentHandler API.- Specified by:
processingInstructionin interfaceDocumentHandler- Throws:
SAXException
-
setDocumentLocator
Deprecated.SAX DocumentHandler API.- Specified by:
setDocumentLocatorin interfaceDocumentHandler
-
startDocument
Deprecated.SAX DocumentHandler API.- Specified by:
startDocumentin interfaceDocumentHandler- Throws:
SAXException
-
startElement
Deprecated.SAX DocumentHandler API.- Specified by:
startElementin interfaceDocumentHandler- Throws:
SAXException
-
notationDecl
Deprecated.SAX DTDHandler API.- Specified by:
notationDeclin interfaceDTDHandler- Throws:
SAXException
-
unparsedEntityDecl
public void unparsedEntityDecl(String name, String publicId, String systemId, String notationName) throws SAXException Deprecated.SAX DTDHandler API.- Specified by:
unparsedEntityDeclin interfaceDTDHandler- Throws:
SAXException
-
resolveEntity
Deprecated.Implements theresolveEntitymethod for the SAX interface, using an underlying CatalogResolver to do the real work.- Specified by:
resolveEntityin interfaceEntityResolver
-
ResolvingXMLReaderfor SAX2.