org.apache.xerces.impl.xs.opti

Class SchemaDOMParser

public class SchemaDOMParser extends DefaultXMLDocumentHandler

Version: $Id: SchemaDOMParser.java,v 1.19 2005/05/30 04:17:11 mrglavas Exp $

Author: Rahul Srivastava, Sun Microsystems Inc. Sandy Gao, IBM

UNKNOWN:

Field Summary
static StringERROR_REPORTER
Property identifier: error reporter.
protected XMLLocatorfLocator
protected NamespaceContextfNamespaceContext
static StringGENERATE_SYNTHETIC_ANNOTATION
Feature identifier: generate synthetic annotations.
Constructor Summary
SchemaDOMParser(XMLParserConfiguration config)
Default constructor.
Method Summary
voidcharacters(XMLString text, Augmentations augs)
Character content.
voidcomment(XMLString text, Augmentations augs)
A comment.
voidemptyElement(QName element, XMLAttributes attributes, Augmentations augs)
An empty element.
voidendCDATA(Augmentations augs)
The end of a CDATA section.
voidendDocument(Augmentations augs)
The end of the document.
voidendElement(QName element, Augmentations augs)
The end of an element.
DocumentgetDocument()
Returns the DOM document object.
DocumentgetDocument2()
Gets the document from SchemaParsingConfig
booleangetFeature(String featureId)
Delegates to SchemaParsingConfig.getFeature
ObjectgetProperty(String propertyId)
Delegates to SchemaParsingConfig.getProperty.
voidignorableWhitespace(XMLString text, Augmentations augs)
Ignorable whitespace.
voidparse(XMLInputSource inputSource)
Delegates parsing to SchemaParsingConfig
voidprocessingInstruction(String target, XMLString data, Augmentations augs)
A processing instruction.
voidreset()
Reset SchemaParsingConfig
voidresetNodePool()
ResetNodePool on SchemaParsingConfig
voidsetEntityResolver(XMLEntityResolver er)
Delegates to SchemaParsingConfig.setEntityResolver.
voidsetFeature(String featureId, boolean state)
Delegates to SchemaParsingConfig.setFeature
voidsetProperty(String propertyId, Object value)
Delegates to SchemaParsingConfig.setProperty.
voidstartCDATA(Augmentations augs)
The start of a CDATA section.
voidstartDocument(XMLLocator locator, String encoding, NamespaceContext namespaceContext, Augmentations augs)
voidstartElement(QName element, XMLAttributes attributes, Augmentations augs)
The start of an element.

Field Detail

ERROR_REPORTER

public static final String ERROR_REPORTER
Property identifier: error reporter.

fLocator

protected XMLLocator fLocator

fNamespaceContext

protected NamespaceContext fNamespaceContext

GENERATE_SYNTHETIC_ANNOTATION

public static final String GENERATE_SYNTHETIC_ANNOTATION
Feature identifier: generate synthetic annotations.

Constructor Detail

SchemaDOMParser

public SchemaDOMParser(XMLParserConfiguration config)
Default constructor.

Method Detail

characters

public void characters(XMLString text, Augmentations augs)
Character content.

Parameters: text The content. augs Additional information that may include infoset augmentations

Throws: XNIException Thrown by handler to signal an error.

comment

public void comment(XMLString text, Augmentations augs)
A comment.

Parameters: text The text in the comment. augs Additional information that may include infoset augmentations

Throws: XNIException Thrown by application to signal an error.

emptyElement

public void emptyElement(QName element, XMLAttributes attributes, Augmentations augs)
An empty element.

Parameters: element The name of the element. attributes The element attributes. augs Additional information that may include infoset augmentations

Throws: XNIException Thrown by handler to signal an error.

endCDATA

public void endCDATA(Augmentations augs)
The end of a CDATA section.

Parameters: augs Additional information that may include infoset augmentations

Throws: XNIException Thrown by handler to signal an error.

endDocument

public void endDocument(Augmentations augs)
The end of the document.

Parameters: augs Additional information that may include infoset augmentations

Throws: XNIException Thrown by handler to signal an error.

endElement

public void endElement(QName element, Augmentations augs)
The end of an element.

Parameters: element The name of the element. augs Additional information that may include infoset augmentations

Throws: XNIException Thrown by handler to signal an error.

getDocument

public Document getDocument()
Returns the DOM document object.

getDocument2

public Document getDocument2()
Gets the document from SchemaParsingConfig

Returns: Document

getFeature

public boolean getFeature(String featureId)
Delegates to SchemaParsingConfig.getFeature

Parameters: featureId

Returns: boolean

getProperty

public Object getProperty(String propertyId)
Delegates to SchemaParsingConfig.getProperty.

Parameters: propertyId

Returns: Object

ignorableWhitespace

public void ignorableWhitespace(XMLString text, Augmentations augs)
Ignorable whitespace. For this method to be called, the document source must have some way of determining that the text containing only whitespace characters should be considered ignorable. For example, the validator can determine if a length of whitespace characters in the document are ignorable based on the element content model.

Parameters: text The ignorable whitespace. augs Additional information that may include infoset augmentations

Throws: XNIException Thrown by handler to signal an error.

parse

public void parse(XMLInputSource inputSource)
Delegates parsing to SchemaParsingConfig

Parameters: inputSource

Throws: IOException

processingInstruction

public void processingInstruction(String target, XMLString data, Augmentations augs)
A processing instruction. Processing instructions consist of a target name and, optionally, text data. The data is only meaningful to the application.

Typically, a processing instruction's data will contain a series of pseudo-attributes. These pseudo-attributes follow the form of element attributes but are not parsed or presented to the application as anything other than text. The application is responsible for parsing the data.

Parameters: target The target. data The data or null if none specified. augs Additional information that may include infoset augmentations

Throws: XNIException Thrown by handler to signal an error.

reset

public void reset()
Reset SchemaParsingConfig

resetNodePool

public void resetNodePool()
ResetNodePool on SchemaParsingConfig

setEntityResolver

public void setEntityResolver(XMLEntityResolver er)
Delegates to SchemaParsingConfig.setEntityResolver.

Parameters: er XMLEntityResolver

setFeature

public void setFeature(String featureId, boolean state)
Delegates to SchemaParsingConfig.setFeature

Parameters: featureId state

setProperty

public void setProperty(String propertyId, Object value)
Delegates to SchemaParsingConfig.setProperty.

Parameters: propertyId value

startCDATA

public void startCDATA(Augmentations augs)
The start of a CDATA section.

Parameters: augs Additional information that may include infoset augmentations

Throws: XNIException Thrown by handler to signal an error.

startDocument

public void startDocument(XMLLocator locator, String encoding, NamespaceContext namespaceContext, Augmentations augs)

startElement

public void startElement(QName element, XMLAttributes attributes, Augmentations augs)
The start of an element.

Parameters: element The name of the element. attributes The element attributes. augs Additional information that may include infoset augmentations

Throws: XNIException Thrown by handler to signal an error.

Copyright © 1999-2005 Apache XML Project. All Rights Reserved.