org.apache.cocoon.components.parser
Class JaxpParser

java.lang.Object
  |
  +--org.apache.avalon.framework.logger.AbstractLoggable
        |
        +--org.apache.cocoon.xml.AbstractXMLProducer
              |
              +--org.apache.cocoon.components.parser.JaxpParser
All Implemented Interfaces:
org.apache.avalon.framework.component.Component, org.apache.avalon.framework.component.Composable, org.apache.avalon.framework.activity.Disposable, DOMFactory, org.xml.sax.ErrorHandler, org.apache.avalon.framework.logger.Loggable, org.apache.avalon.framework.parameters.Parameterizable, Parser, org.apache.avalon.excalibur.pool.Poolable, org.apache.avalon.excalibur.pool.Recyclable, XMLProducer
Direct Known Subclasses:
PooledJaxpParser

Deprecated. The Avalon XML Parser is now used inside Cocoon. This role will be removed in future releases.

public class JaxpParser
extends AbstractXMLProducer
implements Parser, org.xml.sax.ErrorHandler, org.apache.avalon.framework.component.Composable, org.apache.avalon.framework.parameters.Parameterizable, org.apache.avalon.framework.activity.Disposable, org.apache.avalon.excalibur.pool.Poolable

An XMLParser that is only dependant on JAXP 1.1 compliant parsers. The configuration can contain the following parameters :

Version:
CVS $Id: JaxpParser.java,v 1.9 2002/02/22 07:00:10 cziegeler Exp $
Author:
Berin Loritsch, Carsten Ziegeler, Sylvain Wallez

Field Summary
protected  javax.xml.parsers.DocumentBuilder docBuilder
          Deprecated. The DOM builder.
protected  javax.xml.parsers.DocumentBuilderFactory docFactory
          Deprecated. the Document Builder factory
protected  javax.xml.parsers.SAXParserFactory factory
          Deprecated. the SAX Parser factory
protected  org.apache.avalon.framework.component.ComponentManager manager
          Deprecated. the component manager
protected  boolean nsPrefixes
          Deprecated. do we want namespaces also as attributes ?
protected  org.xml.sax.XMLReader reader
          Deprecated. The SAX reader.
protected  Resolver resolver
          Deprecated. the Entity Resolver
protected  boolean reuseParsers
          Deprecated. do we want to reuse parsers ?
 
Fields inherited from class org.apache.cocoon.xml.AbstractXMLProducer
contentHandler, lexicalHandler, xmlConsumer
 
Fields inherited from interface org.apache.cocoon.components.parser.Parser
ROLE
 
Constructor Summary
JaxpParser()
          Deprecated.  
 
Method Summary
 void compose(org.apache.avalon.framework.component.ComponentManager manager)
          Deprecated. Get the Entity Resolver from the component manager
 void dispose()
          Deprecated. Dispose
 void error(org.xml.sax.SAXParseException e)
          Deprecated. Receive notification of a recoverable error.
 void fatalError(org.xml.sax.SAXParseException e)
          Deprecated. Receive notification of a fatal error.
 org.w3c.dom.Document newDocument()
          Deprecated. Create a new Document object.
 org.w3c.dom.Document newDocument(java.lang.String name)
          Deprecated. Create a new Document object with a specified DOCTYPE.
 org.w3c.dom.Document newDocument(java.lang.String name, java.lang.String publicId, java.lang.String systemId)
          Deprecated. Create a new Document object with a specified DOCTYPE, public ID and system ID.
 void parameterize(org.apache.avalon.framework.parameters.Parameters params)
          Deprecated. Configure
 void parse(org.xml.sax.InputSource in)
          Deprecated.  
 org.w3c.dom.Document parseDocument(org.xml.sax.InputSource input)
          Deprecated. Parses a new Document object from the given InputSource.
protected  void setupDocumentBuilder()
          Deprecated. Creates a new DocumentBuilder if needed.
protected  void setupXMLReader()
          Deprecated. Creates a new XMLReader if needed.
 void warning(org.xml.sax.SAXParseException e)
          Deprecated. Receive notification of a warning.
 
Methods inherited from class org.apache.cocoon.xml.AbstractXMLProducer
recycle, setConsumer, setContentHandler, setLexicalHandler
 
Methods inherited from class org.apache.avalon.framework.logger.AbstractLoggable
getLogger, setLogger, setupLogger, setupLogger, setupLogger
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.cocoon.components.parser.Parser
setContentHandler, setLexicalHandler
 
Methods inherited from interface org.apache.cocoon.xml.XMLProducer
setConsumer
 

Field Detail

factory

protected javax.xml.parsers.SAXParserFactory factory
Deprecated. 
the SAX Parser factory

docFactory

protected javax.xml.parsers.DocumentBuilderFactory docFactory
Deprecated. 
the Document Builder factory

reader

protected org.xml.sax.XMLReader reader
Deprecated. 
The SAX reader. It is created lazily by setupXMLReader() and cleared if a parsing error occurs.

docBuilder

protected javax.xml.parsers.DocumentBuilder docBuilder
Deprecated. 
The DOM builder. It is created lazily by setupDocumentBuilder() and cleared if a parsing error occurs.

manager

protected org.apache.avalon.framework.component.ComponentManager manager
Deprecated. 
the component manager

resolver

protected Resolver resolver
Deprecated. 
the Entity Resolver

nsPrefixes

protected boolean nsPrefixes
Deprecated. 
do we want namespaces also as attributes ?

reuseParsers

protected boolean reuseParsers
Deprecated. 
do we want to reuse parsers ?
Constructor Detail

JaxpParser

public JaxpParser()
Deprecated. 
Method Detail

compose

public void compose(org.apache.avalon.framework.component.ComponentManager manager)
             throws org.apache.avalon.framework.component.ComponentException
Deprecated. 
Get the Entity Resolver from the component manager
Specified by:
compose in interface org.apache.avalon.framework.component.Composable

dispose

public void dispose()
Deprecated. 
Dispose
Specified by:
dispose in interface org.apache.avalon.framework.activity.Disposable

parameterize

public void parameterize(org.apache.avalon.framework.parameters.Parameters params)
                  throws org.apache.avalon.framework.parameters.ParameterException
Deprecated. 
Configure
Specified by:
parameterize in interface org.apache.avalon.framework.parameters.Parameterizable

parse

public void parse(org.xml.sax.InputSource in)
           throws org.xml.sax.SAXException,
                  java.io.IOException
Deprecated. 
Specified by:
parse in interface Parser

newDocument

public org.w3c.dom.Document newDocument()
Deprecated. 
Create a new Document object.
Specified by:
newDocument in interface DOMFactory

newDocument

public org.w3c.dom.Document newDocument(java.lang.String name)
Deprecated. 
Create a new Document object with a specified DOCTYPE.
Specified by:
newDocument in interface DOMFactory

newDocument

public org.w3c.dom.Document newDocument(java.lang.String name,
                                        java.lang.String publicId,
                                        java.lang.String systemId)
Deprecated. 
Create a new Document object with a specified DOCTYPE, public ID and system ID.
Specified by:
newDocument in interface DOMFactory

parseDocument

public org.w3c.dom.Document parseDocument(org.xml.sax.InputSource input)
                                   throws org.xml.sax.SAXException,
                                          java.io.IOException
Deprecated. 
Parses a new Document object from the given InputSource.
Specified by:
parseDocument in interface Parser

setupXMLReader

protected void setupXMLReader()
                       throws org.xml.sax.SAXException
Deprecated. 
Creates a new XMLReader if needed.

setupDocumentBuilder

protected void setupDocumentBuilder()
Deprecated. 
Creates a new DocumentBuilder if needed.

error

public void error(org.xml.sax.SAXParseException e)
           throws org.xml.sax.SAXException
Deprecated. 
Receive notification of a recoverable error.
Specified by:
error in interface org.xml.sax.ErrorHandler

fatalError

public void fatalError(org.xml.sax.SAXParseException e)
                throws org.xml.sax.SAXException
Deprecated. 
Receive notification of a fatal error.
Specified by:
fatalError in interface org.xml.sax.ErrorHandler

warning

public void warning(org.xml.sax.SAXParseException e)
             throws org.xml.sax.SAXException
Deprecated. 
Receive notification of a warning.
Specified by:
warning in interface org.xml.sax.ErrorHandler


Copyright � 1999-2002 Apache Software Foundation. All Rights Reserved.