Class ResolvingParser
- java.lang.Object
-
- org.apache.xml.resolver.tools.ResolvingParser
-
- All Implemented Interfaces:
org.xml.sax.DocumentHandler
,org.xml.sax.DTDHandler
,org.xml.sax.EntityResolver
,org.xml.sax.Parser
public class ResolvingParser extends java.lang.Object implements org.xml.sax.Parser, org.xml.sax.DTDHandler, org.xml.sax.DocumentHandler, org.xml.sax.EntityResolver
Deprecated.This interface has been replaced by theResolvingXMLReader
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
- Author:
- Norman Walsh Norman.Walsh@Sun.COM
- See Also:
CatalogResolver
,Parser
-
-
Field Summary
Fields Modifier and Type Field Description static boolean
namespaceAware
Deprecated.Make the parser Namespace aware?static boolean
suppressExplanation
Deprecated.Suppress explanatory message?static boolean
validating
Deprecated.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 void
characters(char[] ch, int start, int length)
Deprecated.SAX DocumentHandler API.void
endDocument()
Deprecated.SAX DocumentHandler API.void
endElement(java.lang.String name)
Deprecated.SAX DocumentHandler API.Catalog
getCatalog()
Deprecated.Return the Catalog being used.void
ignorableWhitespace(char[] ch, int start, int length)
Deprecated.SAX DocumentHandler API.void
notationDecl(java.lang.String name, java.lang.String publicId, java.lang.String systemId)
Deprecated.SAX DTDHandler API.void
parse(java.lang.String systemId)
Deprecated.SAX Parser API.void
parse(org.xml.sax.InputSource input)
Deprecated.SAX Parser API.void
processingInstruction(java.lang.String target, java.lang.String pidata)
Deprecated.SAX DocumentHandler API.org.xml.sax.InputSource
resolveEntity(java.lang.String publicId, java.lang.String systemId)
Deprecated.Implements theresolveEntity
method for the SAX interface, using an underlying CatalogResolver to do the real work.void
setDocumentHandler(org.xml.sax.DocumentHandler handler)
Deprecated.SAX Parser API.void
setDocumentLocator(org.xml.sax.Locator locator)
Deprecated.SAX DocumentHandler API.void
setDTDHandler(org.xml.sax.DTDHandler handler)
Deprecated.SAX Parser API.void
setEntityResolver(org.xml.sax.EntityResolver resolver)
Deprecated.SAX Parser API.void
setErrorHandler(org.xml.sax.ErrorHandler handler)
Deprecated.SAX Parser API.void
setLocale(java.util.Locale locale)
Deprecated.SAX Parser API.void
startDocument()
Deprecated.SAX DocumentHandler API.void
startElement(java.lang.String name, org.xml.sax.AttributeList atts)
Deprecated.SAX DocumentHandler API.void
unparsedEntityDecl(java.lang.String name, java.lang.String publicId, java.lang.String systemId, java.lang.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(org.xml.sax.InputSource input) throws java.io.IOException, org.xml.sax.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
suppressExplanation
is set tofalse
before parsing, it will never be printed.- Specified by:
parse
in interfaceorg.xml.sax.Parser
- Throws:
java.io.IOException
org.xml.sax.SAXException
-
parse
public void parse(java.lang.String systemId) throws java.io.IOException, org.xml.sax.SAXException
Deprecated.SAX Parser API.- Specified by:
parse
in interfaceorg.xml.sax.Parser
- Throws:
java.io.IOException
org.xml.sax.SAXException
- See Also:
parse(InputSource)
-
setDocumentHandler
public void setDocumentHandler(org.xml.sax.DocumentHandler handler)
Deprecated.SAX Parser API.- Specified by:
setDocumentHandler
in interfaceorg.xml.sax.Parser
-
setDTDHandler
public void setDTDHandler(org.xml.sax.DTDHandler handler)
Deprecated.SAX Parser API.- Specified by:
setDTDHandler
in interfaceorg.xml.sax.Parser
-
setEntityResolver
public void setEntityResolver(org.xml.sax.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:
setEntityResolver
in interfaceorg.xml.sax.Parser
-
setErrorHandler
public void setErrorHandler(org.xml.sax.ErrorHandler handler)
Deprecated.SAX Parser API.- Specified by:
setErrorHandler
in interfaceorg.xml.sax.Parser
-
setLocale
public void setLocale(java.util.Locale locale) throws org.xml.sax.SAXException
Deprecated.SAX Parser API.- Specified by:
setLocale
in interfaceorg.xml.sax.Parser
- Throws:
org.xml.sax.SAXException
-
characters
public void characters(char[] ch, int start, int length) throws org.xml.sax.SAXException
Deprecated.SAX DocumentHandler API.- Specified by:
characters
in interfaceorg.xml.sax.DocumentHandler
- Throws:
org.xml.sax.SAXException
-
endDocument
public void endDocument() throws org.xml.sax.SAXException
Deprecated.SAX DocumentHandler API.- Specified by:
endDocument
in interfaceorg.xml.sax.DocumentHandler
- Throws:
org.xml.sax.SAXException
-
endElement
public void endElement(java.lang.String name) throws org.xml.sax.SAXException
Deprecated.SAX DocumentHandler API.- Specified by:
endElement
in interfaceorg.xml.sax.DocumentHandler
- Throws:
org.xml.sax.SAXException
-
ignorableWhitespace
public void ignorableWhitespace(char[] ch, int start, int length) throws org.xml.sax.SAXException
Deprecated.SAX DocumentHandler API.- Specified by:
ignorableWhitespace
in interfaceorg.xml.sax.DocumentHandler
- Throws:
org.xml.sax.SAXException
-
processingInstruction
public void processingInstruction(java.lang.String target, java.lang.String pidata) throws org.xml.sax.SAXException
Deprecated.SAX DocumentHandler API.- Specified by:
processingInstruction
in interfaceorg.xml.sax.DocumentHandler
- Throws:
org.xml.sax.SAXException
-
setDocumentLocator
public void setDocumentLocator(org.xml.sax.Locator locator)
Deprecated.SAX DocumentHandler API.- Specified by:
setDocumentLocator
in interfaceorg.xml.sax.DocumentHandler
-
startDocument
public void startDocument() throws org.xml.sax.SAXException
Deprecated.SAX DocumentHandler API.- Specified by:
startDocument
in interfaceorg.xml.sax.DocumentHandler
- Throws:
org.xml.sax.SAXException
-
startElement
public void startElement(java.lang.String name, org.xml.sax.AttributeList atts) throws org.xml.sax.SAXException
Deprecated.SAX DocumentHandler API.- Specified by:
startElement
in interfaceorg.xml.sax.DocumentHandler
- Throws:
org.xml.sax.SAXException
-
notationDecl
public void notationDecl(java.lang.String name, java.lang.String publicId, java.lang.String systemId) throws org.xml.sax.SAXException
Deprecated.SAX DTDHandler API.- Specified by:
notationDecl
in interfaceorg.xml.sax.DTDHandler
- Throws:
org.xml.sax.SAXException
-
unparsedEntityDecl
public void unparsedEntityDecl(java.lang.String name, java.lang.String publicId, java.lang.String systemId, java.lang.String notationName) throws org.xml.sax.SAXException
Deprecated.SAX DTDHandler API.- Specified by:
unparsedEntityDecl
in interfaceorg.xml.sax.DTDHandler
- Throws:
org.xml.sax.SAXException
-
resolveEntity
public org.xml.sax.InputSource resolveEntity(java.lang.String publicId, java.lang.String systemId)
Deprecated.Implements theresolveEntity
method for the SAX interface, using an underlying CatalogResolver to do the real work.- Specified by:
resolveEntity
in interfaceorg.xml.sax.EntityResolver
-
-