A validator helper for DOMSources.
| Modifier and Type | Class and Description |
|---|---|
| pack-priv class | DOMValidatorHelper.
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 char[] | fCharBuffer
Array for holding character data. |
| private XMLSchemaValidatorComponentManager | fComponentManager
Component manager. |
| private Node | fCurrentElement
Current element. |
| private 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 XMLErrorReporter | fErrorReporter
Error reporter. |
| private NamespaceSupport | fNamespaceContext
The namespace context of this document: stores namespaces in scope. |
| private Node | fRoot
Root node. |
| private XMLSchemaValidator | fSchemaValidator
Schema validator. |
| private SymbolTable | fSymbolTable
Symbol table |
| pack-priv final XMLString | |
| private 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 com. Query method to check if entity with this name was declared. |
| public boolean | isEntityUnparsed(String name)
Implements com. Query method to check if entity is unparsed. |
| private void | |
| private void | |
| private void | |
| private void | |
| public void | validate(Source source, Result result)
Implements com.
|
| 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 char[] fCharBuffer Array for holding character data. | |
| fComponentManager | back to summary |
|---|---|
| private XMLSchemaValidatorComponentManager fComponentManager Component manager. | |
| fCurrentElement | back to summary |
|---|---|
| private Node fCurrentElement Current element. | |
| fDOMNamespaceContext | back to summary |
|---|---|
| private 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 XMLErrorReporter fErrorReporter Error reporter. | |
| fNamespaceContext | back to summary |
|---|---|
| private 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 XMLSchemaValidator fSchemaValidator Schema validator. | |
| fSymbolTable | back to summary |
|---|---|
| private SymbolTable fSymbolTable Symbol table | |
| fTempString | back to summary |
|---|---|
| pack-priv final XMLString fTempString | |
| fValidationManager | back to summary |
|---|---|
| private 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() | |
| isEntityDeclared | back to summary |
|---|---|
| public boolean isEntityDeclared(String name) Implements com. Doc from com. Query method to check if entity with this name was declared. | |
| isEntityUnparsed | back to summary |
|---|---|
| public boolean isEntityUnparsed(String name) Implements com. Doc from com. 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. | |
| validate | back to summary |
|---|---|
| public void validate(Source source, Result result) throws SAXException, IOException Implements com. | |
| 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 prefix, String uri)
Implements com. Declare a Namespace prefix. |
| private void | |
| private void | |
| public Enumeration | getAllPrefixes()
Implements com. Return an enumeration of all prefixes whose declarations are active in the current context. |
| public String | getDeclaredPrefixAt(int index)
Implements com. Returns the prefix at the specified index in the current context. |
| public int | getDeclaredPrefixCount()
Implements com. Return a count of locally declared prefixes, including the default prefix if bound. |
| public String | getPrefix(String uri)
Implements com. Look up a namespace URI and get one of the mapped prefix. |
| public String | getURI(String prefix)
Implements com. Look up a prefix and get the currently-mapped Namespace URI. |
| private String | |
| public void | popContext()
Implements com. Revert to the previous Namespace context. |
| public void | pushContext()
Implements com. Start a new Namespace context. |
| public void | reset()
Implements com. Reset this Namespace support object for reuse. |
| 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 com. Doc from com. 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 com. Doc from com. 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 com. Doc from com. Returns the prefix at the specified index in the current context. | |
| getDeclaredPrefixCount | back to summary |
|---|---|
| public int getDeclaredPrefixCount() Implements com. Doc from com. Return a count of locally declared prefixes, including the default prefix if bound. | |
| getPrefix | back to summary |
|---|---|
| public String getPrefix(String uri) Implements com. Doc from com. 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 com. Doc from com. 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 com. Doc from com. 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 com. Doc from com. 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 com. Doc from com. 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. | |