Class ResolvingParser
- java.lang.Object
-
- com.sun.org.apache.xml.internal.resolver.tools.ResolvingParser
-
- All Implemented Interfaces:
DocumentHandler,DTDHandler,EntityResolver,Parser
public class ResolvingParser extends Object implements Parser, DTDHandler, DocumentHandler, EntityResolver
Deprecated.This interface has been replaced by theResolvingXMLReaderfor 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
- Author:
- Norman Walsh Norman.Walsh@Sun.COM
- See Also:
CatalogResolver,Parser
-
-
Field Summary
Fields Modifier and Type Field Description static booleannamespaceAwareDeprecated.Make the parser Namespace aware?static booleansuppressExplanationDeprecated.Suppress explanatory message?static booleanvalidatingDeprecated.Make the parser validating?
-
Constructor Summary
Constructors Constructor Description ResolvingParser()Deprecated.Constructor.ResolvingParser(CatalogManager manager)Deprecated.Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voidcharacters(char[] ch, int start, int length)Deprecated.SAX DocumentHandler API.voidendDocument()Deprecated.SAX DocumentHandler API.voidendElement(String name)Deprecated.SAX DocumentHandler API.CataloggetCatalog()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.voidparse(String systemId)Deprecated.SAX Parser API.voidparse(InputSource input)Deprecated.SAX Parser API.voidprocessingInstruction(String target, String pidata)Deprecated.SAX DocumentHandler API.InputSourceresolveEntity(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.voidsetLocale(Locale locale)Deprecated.SAX Parser API.voidstartDocument()Deprecated.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 Detail
-
namespaceAware
public static boolean namespaceAware
Deprecated.Make the parser Namespace aware?
-
validating
public static boolean validating
Deprecated.Make the parser validating?
-
suppressExplanation
public static boolean suppressExplanation
Deprecated.Suppress explanatory message?- See Also:
parse(InputSource)
-
-
Constructor Detail
-
ResolvingParser
public ResolvingParser()
Deprecated.Constructor.
-
ResolvingParser
public ResolvingParser(CatalogManager manager)
Deprecated.Constructor.
-
-
Method Detail
-
getCatalog
public Catalog getCatalog()
Deprecated.Return the Catalog being used.
-
parse
public void parse(InputSource input) throws IOException, SAXException
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
public void parse(String systemId) throws IOException, SAXException
Deprecated.SAX Parser API.- Specified by:
parsein interfaceParser- Throws:
IOExceptionSAXException- See Also:
parse(InputSource)
-
setDocumentHandler
public void setDocumentHandler(DocumentHandler handler)
Deprecated.SAX Parser API.- Specified by:
setDocumentHandlerin interfaceParser
-
setDTDHandler
public void setDTDHandler(DTDHandler handler)
Deprecated.SAX Parser API.- Specified by:
setDTDHandlerin interfaceParser
-
setEntityResolver
public void setEntityResolver(EntityResolver resolver)
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
public void setErrorHandler(ErrorHandler handler)
Deprecated.SAX Parser API.- Specified by:
setErrorHandlerin interfaceParser
-
setLocale
public void setLocale(Locale locale) throws SAXException
Deprecated.SAX Parser API.- Specified by:
setLocalein interfaceParser- Throws:
SAXException
-
characters
public void characters(char[] ch, int start, int length) throws SAXExceptionDeprecated.SAX DocumentHandler API.- Specified by:
charactersin interfaceDocumentHandler- Throws:
SAXException
-
endDocument
public void endDocument() throws SAXExceptionDeprecated.SAX DocumentHandler API.- Specified by:
endDocumentin interfaceDocumentHandler- Throws:
SAXException
-
endElement
public void endElement(String name) throws SAXException
Deprecated.SAX DocumentHandler API.- Specified by:
endElementin interfaceDocumentHandler- Throws:
SAXException
-
ignorableWhitespace
public void ignorableWhitespace(char[] ch, int start, int length) throws SAXExceptionDeprecated.SAX DocumentHandler API.- Specified by:
ignorableWhitespacein interfaceDocumentHandler- Throws:
SAXException
-
processingInstruction
public void processingInstruction(String target, String pidata) throws SAXException
Deprecated.SAX DocumentHandler API.- Specified by:
processingInstructionin interfaceDocumentHandler- Throws:
SAXException
-
setDocumentLocator
public void setDocumentLocator(Locator locator)
Deprecated.SAX DocumentHandler API.- Specified by:
setDocumentLocatorin interfaceDocumentHandler
-
startDocument
public void startDocument() throws SAXExceptionDeprecated.SAX DocumentHandler API.- Specified by:
startDocumentin interfaceDocumentHandler- Throws:
SAXException
-
startElement
public void startElement(String name, AttributeList atts) throws SAXException
Deprecated.SAX DocumentHandler API.- Specified by:
startElementin interfaceDocumentHandler- Throws:
SAXException
-
notationDecl
public void notationDecl(String name, String publicId, String systemId) throws SAXException
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
public InputSource resolveEntity(String publicId, String systemId)
Deprecated.Implements theresolveEntitymethod for the SAX interface, using an underlying CatalogResolver to do the real work.- Specified by:
resolveEntityin interfaceEntityResolver
-
-