|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.apache.avalon.framework.logger.AbstractLoggable | +--org.apache.cocoon.xml.AbstractXMLProducer | +--org.apache.cocoon.components.parser.JaxpParser
An XMLParser that is only dependant on JAXP 1.1 compliant parsers. The configuration can contain the following parameters :
false
) : should the parser
validate parsed documents ?
false
) : do we want
namespaces declarations also as 'xmlns:' attributes ?true
confuses some XSL
processors (e.g. Saxon).
true
) : do we want to reuse
parsers or create a new parser for each parse ?true
, parsers are not
recycled in case of parsing errors : some parsers (e.g. Xerces) don't like
to be reused after failure.
SAXParserFactory
implementation class to be used instead of using the standard JAXP mechanism
(SAXParserFactory.newInstance()
). This allows to choose
unambiguously the JAXP implementation to be used when several of them are
available in the classpath.
DocumentBuilderFactory
implementation to be used (similar to
sax-parser-factory
for DOM).
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 |
protected javax.xml.parsers.SAXParserFactory factory
protected javax.xml.parsers.DocumentBuilderFactory docFactory
protected org.xml.sax.XMLReader reader
setupXMLReader()
and cleared if a parsing error occurs.protected javax.xml.parsers.DocumentBuilder docBuilder
setupDocumentBuilder()
and cleared if a parsing error occurs.protected org.apache.avalon.framework.component.ComponentManager manager
protected Resolver resolver
protected boolean nsPrefixes
protected boolean reuseParsers
Constructor Detail |
public JaxpParser()
Method Detail |
public void compose(org.apache.avalon.framework.component.ComponentManager manager) throws org.apache.avalon.framework.component.ComponentException
compose
in interface org.apache.avalon.framework.component.Composable
public void dispose()
dispose
in interface org.apache.avalon.framework.activity.Disposable
public void parameterize(org.apache.avalon.framework.parameters.Parameters params) throws org.apache.avalon.framework.parameters.ParameterException
parameterize
in interface org.apache.avalon.framework.parameters.Parameterizable
public void parse(org.xml.sax.InputSource in) throws org.xml.sax.SAXException, java.io.IOException
parse
in interface Parser
public org.w3c.dom.Document newDocument()
newDocument
in interface DOMFactory
public org.w3c.dom.Document newDocument(java.lang.String name)
newDocument
in interface DOMFactory
public org.w3c.dom.Document newDocument(java.lang.String name, java.lang.String publicId, java.lang.String systemId)
newDocument
in interface DOMFactory
public org.w3c.dom.Document parseDocument(org.xml.sax.InputSource input) throws org.xml.sax.SAXException, java.io.IOException
parseDocument
in interface Parser
protected void setupXMLReader() throws org.xml.sax.SAXException
XMLReader
if needed.protected void setupDocumentBuilder()
DocumentBuilder
if needed.public void error(org.xml.sax.SAXParseException e) throws org.xml.sax.SAXException
error
in interface org.xml.sax.ErrorHandler
public void fatalError(org.xml.sax.SAXParseException e) throws org.xml.sax.SAXException
fatalError
in interface org.xml.sax.ErrorHandler
public void warning(org.xml.sax.SAXParseException e) throws org.xml.sax.SAXException
warning
in interface org.xml.sax.ErrorHandler
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |