org.apache.xml.resolver.tools
Class ResolvingParser

java.lang.Object
  extended byorg.apache.xml.resolver.tools.ResolvingParser
All Implemented Interfaces:
DocumentHandler, DTDHandler, EntityResolver, Parser

Deprecated. This interface has been replaced by the ResolvingXMLReader for SAX2.

public class ResolvingParser
extends Object
implements Parser, DTDHandler, DocumentHandler, EntityResolver

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
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
ResolvingParser()
          Deprecated. Constructor.
ResolvingParser(CatalogManager manager)
          Deprecated. Constructor.
 
Method Summary
 void characters(char[] ch, int start, int length)
          Deprecated. SAX DocumentHandler API.
 void endDocument()
          Deprecated. SAX DocumentHandler API.
 void endElement(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(String name, String publicId, String systemId)
          Deprecated. SAX DTDHandler API.
 void parse(InputSource input)
          Deprecated. SAX Parser API.
 void parse(String systemId)
          Deprecated. SAX Parser API.
 void processingInstruction(String target, String pidata)
          Deprecated. SAX DocumentHandler API.
 InputSource resolveEntity(String publicId, String systemId)
          Deprecated. Implements the resolveEntity 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 setLocale(Locale locale)
          Deprecated. SAX Parser API.
 void startDocument()
          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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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 suppressExplanation is set to false before parsing, it will never be printed.

Specified by:
parse in interface Parser
Throws:
IOException
SAXException

parse

public void parse(String systemId)
           throws IOException,
                  SAXException
Deprecated. 
SAX Parser API.

Specified by:
parse in interface Parser
Throws:
IOException
SAXException
See Also:
parse(InputSource)

setDocumentHandler

public void setDocumentHandler(DocumentHandler handler)
Deprecated. 
SAX Parser API.

Specified by:
setDocumentHandler in interface Parser

setDTDHandler

public void setDTDHandler(DTDHandler handler)
Deprecated. 
SAX Parser API.

Specified by:
setDTDHandler in interface Parser

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:
setEntityResolver in interface Parser

setErrorHandler

public void setErrorHandler(ErrorHandler handler)
Deprecated. 
SAX Parser API.

Specified by:
setErrorHandler in interface Parser

setLocale

public void setLocale(Locale locale)
               throws SAXException
Deprecated. 
SAX Parser API.

Specified by:
setLocale in interface Parser
Throws:
SAXException

characters

public void characters(char[] ch,
                       int start,
                       int length)
                throws SAXException
Deprecated. 
SAX DocumentHandler API.

Specified by:
characters in interface DocumentHandler
Throws:
SAXException

endDocument

public void endDocument()
                 throws SAXException
Deprecated. 
SAX DocumentHandler API.

Specified by:
endDocument in interface DocumentHandler
Throws:
SAXException

endElement

public void endElement(String name)
                throws SAXException
Deprecated. 
SAX DocumentHandler API.

Specified by:
endElement in interface DocumentHandler
Throws:
SAXException

ignorableWhitespace

public void ignorableWhitespace(char[] ch,
                                int start,
                                int length)
                         throws SAXException
Deprecated. 
SAX DocumentHandler API.

Specified by:
ignorableWhitespace in interface DocumentHandler
Throws:
SAXException

processingInstruction

public void processingInstruction(String target,
                                  String pidata)
                           throws SAXException
Deprecated. 
SAX DocumentHandler API.

Specified by:
processingInstruction in interface DocumentHandler
Throws:
SAXException

setDocumentLocator

public void setDocumentLocator(Locator locator)
Deprecated. 
SAX DocumentHandler API.

Specified by:
setDocumentLocator in interface DocumentHandler

startDocument

public void startDocument()
                   throws SAXException
Deprecated. 
SAX DocumentHandler API.

Specified by:
startDocument in interface DocumentHandler
Throws:
SAXException

startElement

public void startElement(String name,
                         AttributeList atts)
                  throws SAXException
Deprecated. 
SAX DocumentHandler API.

Specified by:
startElement in interface DocumentHandler
Throws:
SAXException

notationDecl

public void notationDecl(String name,
                         String publicId,
                         String systemId)
                  throws SAXException
Deprecated. 
SAX DTDHandler API.

Specified by:
notationDecl in interface DTDHandler
Throws:
SAXException

unparsedEntityDecl

public void unparsedEntityDecl(String name,
                               String publicId,
                               String systemId,
                               String notationName)
                        throws SAXException
Deprecated. 
SAX DTDHandler API.

Specified by:
unparsedEntityDecl in interface DTDHandler
Throws:
SAXException

resolveEntity

public InputSource resolveEntity(String publicId,
                                 String systemId)
Deprecated. 
Implements the resolveEntity method for the SAX interface, using an underlying CatalogResolver to do the real work.

Specified by:
resolveEntity in interface EntityResolver


Copyright © 2001-2003 Apache Software Foundation. All Rights Reserved.