Top Inners Fields Constructors Methods
com.sun.org.apache.xerces.internal.impl.xs.opti

public Class SchemaDOMParser

extends DefaultXMLDocumentHandler
Class Inheritance
Imports
java.io.IOException, com.sun.org.apache.xerces.internal.impl.Constants, .XMLErrorReporter, com.sun.org.apache.xerces.internal.impl.xs.SchemaSymbols, .XSMessageFormatter, com.sun.org.apache.xerces.internal.util.XMLAttributesImpl, .XMLChar, com.sun.org.apache.xerces.internal.xni.Augmentations, .NamespaceContext, .QName, .XMLAttributes, .XMLLocator, .XMLString, .XNIException, com.sun.org.apache.xerces.internal.xni.parser.XMLEntityResolver, .XMLInputSource, .XMLParserConfiguration, org.w3c.dom.Document

Authors
Rahul Srivastava, Sun Microsystems Inc., Sandy Gao, IBM

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class
SchemaDOMParser.BooleanStack

A simple boolean based stack.

Field Summary

Modifier and TypeField and Description
pack-priv XMLParserConfiguration
public static final String
ERROR_REPORTER

Property identifier: error reporter.

private int
private ElementImpl
private int
private XMLAttributes
pack-priv XMLErrorReporter
private boolean
private SchemaDOMParser.BooleanStack
private int
protected XMLLocator
protected NamespaceContext
private SchemaDOMParser.BooleanStack
public static final String
GENERATE_SYNTHETIC_ANNOTATION

Feature identifier: generate synthetic annotations.

pack-priv SchemaDOM

Constructor Summary

AccessConstructor and Description
public
SchemaDOMParser(XMLParserConfiguration config)

Default constructor.

Method Summary

Modifier and TypeMethod and Description
public void
characters(XMLString
The content.
text
,
Augmentations
Additional information that may include infoset augmentations
augs
)

Overrides com.sun.org.apache.xerces.internal.impl.xs.opti.DefaultXMLDocumentHandler.characters.

Implements com.sun.org.apache.xerces.internal.xni.XMLDocumentHandler.characters.

Character content.

public void
public void
emptyElement(QName
The name of the element.
element
,
XMLAttributes
The element attributes.
attributes
,
Augmentations
Additional information that may include infoset augmentations
augs
)

Overrides com.sun.org.apache.xerces.internal.impl.xs.opti.DefaultXMLDocumentHandler.emptyElement.

Implements com.sun.org.apache.xerces.internal.xni.XMLDocumentHandler.emptyElement.

An empty element.

public void
endCDATA(Augmentations
Additional information that may include infoset augmentations
augs
)

Overrides com.sun.org.apache.xerces.internal.impl.xs.opti.DefaultXMLDocumentHandler.endCDATA.

Implements com.sun.org.apache.xerces.internal.xni.XMLDocumentHandler.endCDATA.

The end of a CDATA section.

public void
public void
endElement(QName
The name of the element.
element
,
Augmentations
Additional information that may include infoset augmentations
augs
)

Overrides com.sun.org.apache.xerces.internal.impl.xs.opti.DefaultXMLDocumentHandler.endElement.

Implements com.sun.org.apache.xerces.internal.xni.XMLDocumentHandler.endElement.

The end of an element.

public Document
getDocument()

Returns the DOM document object.

public boolean

Returns:

boolean
getFeature
(String featureId)

Delegates to SchemaParsingConfig.getFeature

public Object

Returns:

Object
getProperty
(String propertyId)

Delegates to SchemaParsingConfig.getProperty.

private boolean
public void
ignorableWhitespace(XMLString
The ignorable whitespace.
text
,
Augmentations
Additional information that may include infoset augmentations
augs
)

Overrides com.sun.org.apache.xerces.internal.impl.xs.opti.DefaultXMLDocumentHandler.ignorableWhitespace.

Implements com.sun.org.apache.xerces.internal.xni.XMLDocumentHandler.ignorableWhitespace.

Ignorable whitespace.

public void
parse(XMLInputSource inputSource)

Delegates parsing to SchemaParsingConfig

public void
public void
reset()

Reset SchemaParsingConfig

public void
resetNodePool()

ResetNodePool on SchemaParsingConfig

public void
setEntityResolver(XMLEntityResolver
XMLEntityResolver
er
)

Delegates to SchemaParsingConfig.setEntityResolver.

public void
setFeature(String featureId, boolean state)

Delegates to SchemaParsingConfig.setFeature

public void
setProperty(String propertyId, Object value)

Delegates to SchemaParsingConfig.setProperty.

public void
startCDATA(Augmentations
Additional information that may include infoset augmentations
augs
)

Overrides com.sun.org.apache.xerces.internal.impl.xs.opti.DefaultXMLDocumentHandler.startCDATA.

Implements com.sun.org.apache.xerces.internal.xni.XMLDocumentHandler.startCDATA.

The start of a CDATA section.

public void
startDocument(XMLLocator
The document locator, or null if the document location cannot be reported during the parsing of this document. However, it is strongly recommended that a locator be supplied that can at least report the system identifier of the document.
locator
,
String
The auto-detected IANA encoding name of the entity stream. This value will be null in those situations where the entity encoding is not auto-detected (e.g. internal entities or a document entity that is parsed from a java.io.Reader).
encoding
,
NamespaceContext
The namespace context in effect at the start of this document. This object represents the current context. Implementors of this class are responsible for copying the namespace bindings from the the current context (and its parent contexts) if that information is important.
namespaceContext
,
Augmentations
Additional information that may include infoset augmentations
augs
)

Overrides com.sun.org.apache.xerces.internal.impl.xs.opti.DefaultXMLDocumentHandler.startDocument.

Implements com.sun.org.apache.xerces.internal.xni.XMLDocumentHandler.startDocument.

The start of the document.

public void
startElement(QName
The name of the element.
element
,
XMLAttributes
The element attributes.
attributes
,
Augmentations
Additional information that may include infoset augmentations
augs
)

Overrides com.sun.org.apache.xerces.internal.impl.xs.opti.DefaultXMLDocumentHandler.startElement.

Implements com.sun.org.apache.xerces.internal.xni.XMLDocumentHandler.startElement.

The start of an element.

Inherited from com.sun.org.apache.xerces.internal.impl.xs.opti.DefaultXMLDocumentHandler:
anyattributeDecldoctypeDeclelementelementDeclemptyendAttlistendConditionalendContentModelendDTDendExternalSubsetendGeneralEntityendGroupendParameterEntityendPrefixMappingexternalEntityDeclgetDocumentSourcegetDTDContentModelSourcegetDTDSourceignoredCharactersinternalEntityDeclnotationDecloccurrencepcdataseparatorsetDocumentSourcesetDTDContentModelSourcesetDTDSourcestartAttliststartConditionalstartContentModelstartDTDstartExternalSubsetstartGeneralEntitystartGroupstartParameterEntitystartPrefixMappingtextDeclunparsedEntityDeclxmlDecl

Field Detail

configback to summary
pack-priv XMLParserConfiguration config
ERROR_REPORTERback to summary
public static final String ERROR_REPORTER

Property identifier: error reporter.

fAnnotationDepthback to summary
private int fAnnotationDepth
fCurrentAnnotationElementback to summary
private ElementImpl fCurrentAnnotationElement
fDepthback to summary
private int fDepth
fEmptyAttrback to summary
private XMLAttributes fEmptyAttr
fErrorReporterback to summary
pack-priv XMLErrorReporter fErrorReporter
fGenerateSyntheticAnnotationback to summary
private boolean fGenerateSyntheticAnnotation
fHasNonSchemaAttributesback to summary
private SchemaDOMParser.BooleanStack fHasNonSchemaAttributes
fInnerAnnotationDepthback to summary
private int fInnerAnnotationDepth
fLocatorback to summary
protected XMLLocator fLocator
fNamespaceContextback to summary
protected NamespaceContext fNamespaceContext
fSawAnnotationback to summary
private SchemaDOMParser.BooleanStack fSawAnnotation
GENERATE_SYNTHETIC_ANNOTATIONback to summary
public static final String GENERATE_SYNTHETIC_ANNOTATION

Feature identifier: generate synthetic annotations.

schemaDOMback to summary
pack-priv SchemaDOM schemaDOM

Constructor Detail

SchemaDOMParserback to summary
public SchemaDOMParser(XMLParserConfiguration config)

Default constructor.

Method Detail

charactersback to summary
public void characters(XMLString text, Augmentations augs) throws XNIException

Overrides com.sun.org.apache.xerces.internal.impl.xs.opti.DefaultXMLDocumentHandler.characters.

Implements com.sun.org.apache.xerces.internal.xni.XMLDocumentHandler.characters.

Character content.

Parameters
text:XMLString

The content.

augs:Augmentations

Additional information that may include infoset augmentations

Exceptions
XNIException:
Thrown by handler to signal an error.
commentback to summary
public void comment(XMLString text, Augmentations augs) throws XNIException

Overrides com.sun.org.apache.xerces.internal.impl.xs.opti.DefaultXMLDocumentHandler.comment.

Implements com.sun.org.apache.xerces.internal.xni.XMLDocumentHandler.comment, com.sun.org.apache.xerces.internal.xni.XMLDTDHandler.comment.

A comment.

Parameters
text:XMLString

The text in the comment.

augs:Augmentations

Additional information that may include infoset augmentations

Exceptions
XNIException:
Thrown by application to signal an error.
emptyElementback to summary
public void emptyElement(QName element, XMLAttributes attributes, Augmentations augs) throws XNIException

Overrides com.sun.org.apache.xerces.internal.impl.xs.opti.DefaultXMLDocumentHandler.emptyElement.

Implements com.sun.org.apache.xerces.internal.xni.XMLDocumentHandler.emptyElement.

An empty element.

Parameters
element:QName

The name of the element.

attributes:XMLAttributes

The element attributes.

augs:Augmentations

Additional information that may include infoset augmentations

Exceptions
XNIException:
Thrown by handler to signal an error.
endCDATAback to summary
public void endCDATA(Augmentations augs) throws XNIException

Overrides com.sun.org.apache.xerces.internal.impl.xs.opti.DefaultXMLDocumentHandler.endCDATA.

Implements com.sun.org.apache.xerces.internal.xni.XMLDocumentHandler.endCDATA.

The end of a CDATA section.

Parameters
augs:Augmentations

Additional information that may include infoset augmentations

Exceptions
XNIException:
Thrown by handler to signal an error.
endDocumentback to summary
public void endDocument(Augmentations augs) throws XNIException

Overrides com.sun.org.apache.xerces.internal.impl.xs.opti.DefaultXMLDocumentHandler.endDocument.

Implements com.sun.org.apache.xerces.internal.xni.XMLDocumentHandler.endDocument.

The end of the document.

Parameters
augs:Augmentations

Additional information that may include infoset augmentations

Exceptions
XNIException:
Thrown by handler to signal an error.
endElementback to summary
public void endElement(QName element, Augmentations augs) throws XNIException

Overrides com.sun.org.apache.xerces.internal.impl.xs.opti.DefaultXMLDocumentHandler.endElement.

Implements com.sun.org.apache.xerces.internal.xni.XMLDocumentHandler.endElement.

The end of an element.

Parameters
element:QName

The name of the element.

augs:Augmentations

Additional information that may include infoset augmentations

Exceptions
XNIException:
Thrown by handler to signal an error.
getDocumentback to summary
public Document getDocument()

Returns the DOM document object.

getFeatureback to summary
public boolean getFeature(String featureId)

Delegates to SchemaParsingConfig.getFeature

Returns:boolean

boolean

getPropertyback to summary
public Object getProperty(String propertyId)

Delegates to SchemaParsingConfig.getProperty.

Returns:Object

Object

hasNonSchemaAttributesback to summary
private boolean hasNonSchemaAttributes(QName element, XMLAttributes attributes)
ignorableWhitespaceback to summary
public void ignorableWhitespace(XMLString text, Augmentations augs) throws XNIException

Overrides com.sun.org.apache.xerces.internal.impl.xs.opti.DefaultXMLDocumentHandler.ignorableWhitespace.

Implements com.sun.org.apache.xerces.internal.xni.XMLDocumentHandler.ignorableWhitespace.

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:XMLString

The ignorable whitespace.

augs:Augmentations

Additional information that may include infoset augmentations

Exceptions
XNIException:
Thrown by handler to signal an error.
parseback to summary
public void parse(XMLInputSource inputSource) throws IOException

Delegates parsing to SchemaParsingConfig

processingInstructionback to summary
public void processingInstruction(String target, XMLString data, Augmentations augs) throws XNIException

Overrides com.sun.org.apache.xerces.internal.impl.xs.opti.DefaultXMLDocumentHandler.processingInstruction.

Implements com.sun.org.apache.xerces.internal.xni.XMLDocumentHandler.processingInstruction, com.sun.org.apache.xerces.internal.xni.XMLDTDHandler.processingInstruction.

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:String

The target.

data:XMLString

The data or null if none specified.

augs:Augmentations

Additional information that may include infoset augmentations

Exceptions
XNIException:
Thrown by handler to signal an error.
resetback to summary
public void reset()

Reset SchemaParsingConfig

resetNodePoolback to summary
public void resetNodePool()

ResetNodePool on SchemaParsingConfig

setEntityResolverback to summary
public void setEntityResolver(XMLEntityResolver er)

Delegates to SchemaParsingConfig.setEntityResolver.

Parameters
er:XMLEntityResolver

XMLEntityResolver

setFeatureback to summary
public void setFeature(String featureId, boolean state)

Delegates to SchemaParsingConfig.setFeature

setPropertyback to summary
public void setProperty(String propertyId, Object value)

Delegates to SchemaParsingConfig.setProperty.

startCDATAback to summary
public void startCDATA(Augmentations augs) throws XNIException

Overrides com.sun.org.apache.xerces.internal.impl.xs.opti.DefaultXMLDocumentHandler.startCDATA.

Implements com.sun.org.apache.xerces.internal.xni.XMLDocumentHandler.startCDATA.

The start of a CDATA section.

Parameters
augs:Augmentations

Additional information that may include infoset augmentations

Exceptions
XNIException:
Thrown by handler to signal an error.
startDocumentback to summary
public void startDocument(XMLLocator locator, String encoding, NamespaceContext namespaceContext, Augmentations augs) throws XNIException

Overrides com.sun.org.apache.xerces.internal.impl.xs.opti.DefaultXMLDocumentHandler.startDocument.

Implements com.sun.org.apache.xerces.internal.xni.XMLDocumentHandler.startDocument.

Doc from com.sun.org.apache.xerces.internal.impl.xs.opti.DefaultXMLDocumentHandler.startDocument.

The start of the document.

Parameters
locator:XMLLocator

The document locator, or null if the document location cannot be reported during the parsing of this document. However, it is strongly recommended that a locator be supplied that can at least report the system identifier of the document.

encoding:String

The auto-detected IANA encoding name of the entity stream. This value will be null in those situations where the entity encoding is not auto-detected (e.g. internal entities or a document entity that is parsed from a java.io.Reader).

namespaceContext:NamespaceContext

Doc from com.sun.org.apache.xerces.internal.xni.XMLDocumentHandler.startDocument.

The namespace context in effect at the start of this document. This object represents the current context. Implementors of this class are responsible for copying the namespace bindings from the the current context (and its parent contexts) if that information is important.

augs:Augmentations

Additional information that may include infoset augmentations

Exceptions
XNIException:
Thrown by handler to signal an error.
startElementback to summary
public void startElement(QName element, XMLAttributes attributes, Augmentations augs) throws XNIException

Overrides com.sun.org.apache.xerces.internal.impl.xs.opti.DefaultXMLDocumentHandler.startElement.

Implements com.sun.org.apache.xerces.internal.xni.XMLDocumentHandler.startElement.

The start of an element.

Parameters
element:QName

The name of the element.

attributes:XMLAttributes

The element attributes.

augs:Augmentations

Additional information that may include infoset augmentations

Exceptions
XNIException:
Thrown by handler to signal an error.
com.sun.org.apache.xerces.internal.impl.xs.opti back to summary

private final Class SchemaDOMParser.BooleanStack

extends Object
Class Inheritance
  • java.lang.Object
  • com.sun.org.apache.xerces.internal.impl.xs.opti.SchemaDOMParser.BooleanStack

A simple boolean based stack.

Field Summary

Modifier and TypeField and Description
private boolean[]
fData

Stack data.

private int
fDepth

Stack depth.

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
clear()

Clears the stack.

private void
ensureCapacity(int size)

Ensures capacity.

public boolean
pop()

Pops a value off of the stack.

public void
push(boolean value)

Pushes a value onto the stack.

public int
size()

Returns the size of the stack.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

fDataback to summary
private boolean[] fData

Stack data.

fDepthback to summary
private int fDepth

Stack depth.

Constructor Detail

BooleanStackback to summary
public BooleanStack()

Method Detail

clearback to summary
public void clear()

Clears the stack.

ensureCapacityback to summary
private void ensureCapacity(int size)

Ensures capacity.

popback to summary
public boolean pop()

Pops a value off of the stack.

pushback to summary
public void push(boolean value)

Pushes a value onto the stack.

sizeback to summary
public int size()

Returns the size of the stack.