A validator helper for DOMSources.
| Modifier and Type | Class and Description |
|---|---|
| pack-priv class | DOMValidatorHelper.DOMNamespaceContext
NamespaceContext for the DOMSource, includes context for ancestor nodes. |
| Modifier and Type | Field and Description |
|---|---|
| private static final int | CHUNK_MASK
Chunk mask (CHUNK_SIZE - 1). |
| private static final int | CHUNK_SIZE
Chunk size (1024). |
| private static final String | ERROR_REPORTER
Property identifier: error reporter. |
| pack-priv final QName | |
| pack-priv final XMLAttributesImpl | |
| private final char[] | fCharBuffer
Array for holding character data. |
| private final XMLSchemaValidatorComponentManager | fComponentManager
Component manager. |
| private Node | fCurrentElement
Current element. |
| private final DOMValidatorHelper. | fDOMNamespaceContext
The namespace context of the DOMSource, includes context from ancestor nodes. |
| private final DOMResultAugmentor | fDOMResultAugmentor
DOM result augmentor. |
| private final DOMResultBuilder | fDOMResultBuilder
DOM result builder. |
| private DOMDocumentHandler | fDOMValidatorHandler
DOM document handler. |
| pack-priv final QName | fElementQName
Fields for start element, end element and characters. |
| private NamedNodeMap | fEntities
Map for tracking unparsed entities. |
| private final XMLErrorReporter | fErrorReporter
Error reporter. |
| private final NamespaceSupport | fNamespaceContext
The namespace context of this document: stores namespaces in scope. |
| private Node | fRoot
Root node. |
| private final XMLSchemaValidator | fSchemaValidator
Schema validator. |
| private final SymbolTable | fSymbolTable
Symbol table |
| pack-priv final XMLString | |
| private final ValidationManager | fValidationManager
Validation manager. |
| private final SimpleLocator | fXMLLocator
Simple Locator. |
| private static final String | NAMESPACE_CONTEXT
Property identifier: namespace context. |
| private static final String | SCHEMA_VALIDATOR
Property identifier: XML Schema validator. |
| private static final String | SYMBOL_TABLE
Property identifier: symbol table. |
| private static final String | VALIDATION_MANAGER
Property identifier: validation manager. |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| private void | |
| private void | |
| private void | |
| pack-priv Node | |
| public boolean | isEntityDeclared(String name)
Implements org. |
| public boolean | isEntityUnparsed(String name)
Implements org. |
| private void | |
| private void | |
| private void | |
| private void | |
| private boolean | useIsSameNode(Node node)
Use isSameNode() for testing node identity if the DOM implementation supports DOM Level 3 core and it isn't the Xerces implementation. |
| public void | validate(Source source, Result result)
Implements org. |
| private void |
| CHUNK_MASK | back to summary |
|---|---|
| private static final int CHUNK_MASK Chunk mask (CHUNK_SIZE - 1). | |
| CHUNK_SIZE | back to summary |
|---|---|
| private static final int CHUNK_SIZE Chunk size (1024). | |
| ERROR_REPORTER | back to summary |
|---|---|
| private static final String ERROR_REPORTER Property identifier: error reporter. | |
| fAttributeQName | back to summary |
|---|---|
| pack-priv final QName fAttributeQName | |
| fAttributes | back to summary |
|---|---|
| pack-priv final XMLAttributesImpl fAttributes | |
| fCharBuffer | back to summary |
|---|---|
| private final char[] fCharBuffer Array for holding character data. | |
| fComponentManager | back to summary |
|---|---|
| private final XMLSchemaValidatorComponentManager fComponentManager Component manager. | |
| fCurrentElement | back to summary |
|---|---|
| private Node fCurrentElement Current element. | |
| fDOMNamespaceContext | back to summary |
|---|---|
| private final DOMValidatorHelper. The namespace context of the DOMSource, includes context from ancestor nodes. | |
| fDOMResultAugmentor | back to summary |
|---|---|
| private final DOMResultAugmentor fDOMResultAugmentor DOM result augmentor. | |
| fDOMResultBuilder | back to summary |
|---|---|
| private final DOMResultBuilder fDOMResultBuilder DOM result builder. | |
| fDOMValidatorHandler | back to summary |
|---|---|
| private DOMDocumentHandler fDOMValidatorHandler DOM document handler. | |
| fElementQName | back to summary |
|---|---|
| pack-priv final QName fElementQName Fields for start element, end element and characters. | |
| fEntities | back to summary |
|---|---|
| private NamedNodeMap fEntities Map for tracking unparsed entities. | |
| fErrorReporter | back to summary |
|---|---|
| private final XMLErrorReporter fErrorReporter Error reporter. | |
| fNamespaceContext | back to summary |
|---|---|
| private final NamespaceSupport fNamespaceContext The namespace context of this document: stores namespaces in scope. | |
| fRoot | back to summary |
|---|---|
| private Node fRoot Root node. | |
| fSchemaValidator | back to summary |
|---|---|
| private final XMLSchemaValidator fSchemaValidator Schema validator. | |
| fSymbolTable | back to summary |
|---|---|
| private final SymbolTable fSymbolTable Symbol table | |
| fTempString | back to summary |
|---|---|
| pack-priv final XMLString fTempString | |
| fValidationManager | back to summary |
|---|---|
| private final ValidationManager fValidationManager Validation manager. | |
| fXMLLocator | back to summary |
|---|---|
| private final SimpleLocator fXMLLocator Simple Locator. | |
| NAMESPACE_CONTEXT | back to summary |
|---|---|
| private static final String NAMESPACE_CONTEXT Property identifier: namespace context. | |
| SCHEMA_VALIDATOR | back to summary |
|---|---|
| private static final String SCHEMA_VALIDATOR Property identifier: XML Schema validator. | |
| SYMBOL_TABLE | back to summary |
|---|---|
| private static final String SYMBOL_TABLE Property identifier: symbol table. | |
| VALIDATION_MANAGER | back to summary |
|---|---|
| private static final String VALIDATION_MANAGER Property identifier: validation manager. | |
| DOMValidatorHelper | back to summary |
|---|---|
| public DOMValidatorHelper(XMLSchemaValidatorComponentManager componentManager) | |
| beginNode | back to summary |
|---|---|
| private void beginNode(Node node) Do processing for the start of a node. | |
| fillQName | back to summary |
|---|---|
| private void fillQName(QName toFill, Node node) | |
| finishNode | back to summary |
|---|---|
| private void finishNode(Node node) Do processing for the end of a node. | |
| getCurrentElement | back to summary |
|---|---|
| pack-priv Node getCurrentElement() Returns the current element node. | |
| isEntityDeclared | back to summary |
|---|---|
| public boolean isEntityDeclared(String name) Implements org. Doc from org. Query method to check if entity with this name was declared.
| |
| isEntityUnparsed | back to summary |
|---|---|
| public boolean isEntityUnparsed(String name) Implements org. Doc from org. Query method to check if entity is unparsed.
| |
| processAttributes | back to summary |
|---|---|
| private void processAttributes(NamedNodeMap attrMap) | |
| sendCharactersToValidator | back to summary |
|---|---|
| private void sendCharactersToValidator(String str) | |
| setupDOMResultHandler | back to summary |
|---|---|
| private void setupDOMResultHandler(DOMSource source, DOMResult result) throws SAXException Sets up handler for | |
| setupEntityMap | back to summary |
|---|---|
| private void setupEntityMap(Document doc) Extracts NamedNodeMap of entities. We need this to validate elements and attributes of type xs:ENTITY, xs:ENTITIES or types dervied from them. | |
| useIsSameNode | back to summary |
|---|---|
| private boolean useIsSameNode(Node node) Use isSameNode() for testing node identity if the DOM implementation supports DOM Level 3 core and it isn't the Xerces implementation. | |
| validate | back to summary |
|---|---|
| public void validate(Source source, Result result) throws SAXException, IOException Implements org. | |
| validate | back to summary |
|---|---|
| private void validate(Node node) Traverse the DOM and fire events to the schema validator. | |
| Modifier and Type | Field and Description |
|---|---|
| protected boolean | fDOMContextBuilt
Flag indicating whether the namespace context has been from the root node's ancestors. |
| protected String[] | fNamespace
Namespace binding information. |
| protected int | fNamespaceSize
The size of the namespace information array. |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public boolean | declarePrefix(String
The prefix to declare, or null for the empty
string. prefix, String The Namespace URI to associate with the prefix. uri)Implements org. |
| private void | |
| private void | |
| public Enumeration | getAllPrefixes()
Implements org. |
| public String | getDeclaredPrefixAt(int index)
Implements org. |
| public int | getDeclaredPrefixCount()
Implements org. |
| public String | getPrefix(String
The namespace URI to look up. uri)Implements org. |
| public String | getURI(String
The prefix to look up. prefix)Implements org. |
| private String | |
| public void | popContext()
Implements org. |
| public void | pushContext()
Implements org. |
| public void | reset()
Implements org. |
| fDOMContextBuilt | back to summary |
|---|---|
| protected boolean fDOMContextBuilt Flag indicating whether the namespace context has been from the root node's ancestors. | |
| fNamespace | back to summary |
|---|---|
| protected String[] fNamespace Namespace binding information. This array is composed of a series of tuples containing the namespace binding information: <prefix, uri>. | |
| fNamespaceSize | back to summary |
|---|---|
| protected int fNamespaceSize The size of the namespace information array. | |
| DOMNamespaceContext | back to summary |
|---|---|
| pack-priv DOMNamespaceContext() | |
| declarePrefix | back to summary |
|---|---|
| public boolean declarePrefix(String prefix, String uri) Implements org. Doc from org. Declare a Namespace prefix. This method declares a prefix in the current Namespace context; the prefix will remain in force until this context is popped, unless it is shadowed in a descendant context. Note that to declare a default Namespace, use the empty string. The prefixes "xml" and "xmlns" can't be rebound. Note that you must not declare a prefix after you've pushed and popped another Namespace. | |
| declarePrefix0 | back to summary |
|---|---|
| private void declarePrefix0(String prefix, String uri) | |
| fillNamespaceContext | back to summary |
|---|---|
| private void fillNamespaceContext() | |
| getAllPrefixes | back to summary |
|---|---|
| public Enumeration Implements org. Doc from org. Return an enumeration of all prefixes whose declarations are active in the current context. This includes declarations from parent contexts that have not been overridden.
| |
| getDeclaredPrefixAt | back to summary |
|---|---|
| public String getDeclaredPrefixAt(int index) Implements org. Doc from org. Returns the prefix at the specified index in the current context. | |
| getDeclaredPrefixCount | back to summary |
|---|---|
| public int getDeclaredPrefixCount() Implements org. Doc from org. Return a count of locally declared prefixes, including the default prefix if bound. | |
| getPrefix | back to summary |
|---|---|
| public String getPrefix(String uri) Implements org. Doc from org. Look up a namespace URI and get one of the mapped prefix. This method looks up the namespace URI in the current context. If more than one prefix is currently mapped to the same URI, this method will make an arbitrary selection If no mapping is found, this methods will continue lookup in the parent context(s). | |
| getURI | back to summary |
|---|---|
| public String getURI(String prefix) Implements org. Doc from org. Look up a prefix and get the currently-mapped Namespace URI. This method looks up the prefix in the current context. If no mapping is found, this methods will continue lookup in the parent context(s). Use the empty string ("") for the default Namespace. | |
| getURI0 | back to summary |
|---|---|
| private String getURI0(String prefix) | |
| popContext | back to summary |
|---|---|
| public void popContext() Implements org. Doc from org. Revert to the previous Namespace context. The context should be popped at the end of each XML element. After popping the context, all Namespace prefix mappings that were previously in force are restored. Users must not attempt to declare additional Namespace prefixes after popping a context, unless you push another context first. | |
| pushContext | back to summary |
|---|---|
| public void pushContext() Implements org. Doc from org. Start a new Namespace context. A new context should be pushed at the beginning of each XML element: the new context will automatically inherit the declarations of its parent context, but it will also keep track of which declarations were made within this context.
| |
| reset | back to summary |
|---|---|
| public void reset() Implements org. Doc from org. Reset this Namespace support object for reuse. It is necessary to invoke this method before reusing the Namespace support object for a new session. Note that implementations of this method need to ensure that the declaration of the prefixes "xmlns" and "xml" are available. | |