java.lang.Object | |
↳ | org.apache.xerces.impl.xs.XMLSchemaValidator |
The XML Schema validator. The validator implements a document filter: receiving document events from the scanner; validating the content and structure; augmenting the InfoSet, if applicable; and notifying the parser of the information resulting from the validation process.
This component requires the following features and properties from the component manager that uses it:
Nested Classes | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
XMLSchemaValidator.KeyRefValueStore | Key reference value store. | ||||||||||
XMLSchemaValidator.KeyValueStore | Key value store. | ||||||||||
XMLSchemaValidator.LocalIDKey | |||||||||||
XMLSchemaValidator.ShortVector | A simple vector for short s. |
||||||||||
XMLSchemaValidator.UniqueValueStore | Unique value store. | ||||||||||
XMLSchemaValidator.ValueStoreBase | Value store implementation base class. | ||||||||||
XMLSchemaValidator.ValueStoreCache | Value store cache. | ||||||||||
XMLSchemaValidator.XPathMatcherStack | Stack of XPath matchers for identity constraints. | ||||||||||
XMLSchemaValidator.XSIErrorReporter | A wrapper of the standard error reporter. |
Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
String | ALLOW_JAVA_ENCODINGS | Feature identifier: whether to recognize java encoding names | |||||||||
String | CONTINUE_AFTER_FATAL_ERROR | Feature identifier: whether to continue parsing a schema after a fatal error is encountered | |||||||||
String | DYNAMIC_VALIDATION | Feature identifier: dynamic validation. | |||||||||
String | ENTITY_MANAGER | ||||||||||
String | ENTITY_RESOLVER | Property identifier: entity resolver. | |||||||||
String | ERROR_REPORTER | Property identifier: error reporter. | |||||||||
String | GENERATE_SYNTHETIC_ANNOTATIONS | Feature: generate synthetic annotations | |||||||||
String | HONOUR_ALL_SCHEMALOCATIONS | Feature identifier: honour all schemaLocations | |||||||||
String | IDENTITY_CONSTRAINT_CHECKING | Feature identifier: whether to ignore identity constraint errors | |||||||||
int | ID_CONSTRAINT_NUM | ||||||||||
String | ID_IDREF_CHECKING | Feature identifier: whether to ignore ID/IDREF errors | |||||||||
String | IGNORE_XSI_TYPE | Feature identifier: whether to ignore xsi:type attributes until a global element declaration is encountered | |||||||||
String | JAXP_SCHEMA_LANGUAGE | Property identifier: JAXP schema language. | |||||||||
String | JAXP_SCHEMA_SOURCE | Property identifier: JAXP schema source. | |||||||||
String | NORMALIZE_DATA | Feature identifier: expose schema normalized value | |||||||||
String | PARSER_SETTINGS | ||||||||||
String | ROOT_TYPE_DEF | Property identifier: root type definition. | |||||||||
String | SCHEMA_AUGMENT_PSVI | Feature identifier: augment PSVI | |||||||||
String | SCHEMA_ELEMENT_DEFAULT | Feature identifier: send element default value via characters() | |||||||||
String | SCHEMA_FULL_CHECKING | Feature identifier: schema full checking | |||||||||
String | SCHEMA_LOCATION | Property identifier: schema location. | |||||||||
String | SCHEMA_NONS_LOCATION | Property identifier: no namespace schema location. | |||||||||
String | SCHEMA_VALIDATION | Feature identifier: validation. | |||||||||
String | STANDARD_URI_CONFORMANT_FEATURE | Feature identifier: standard uri conformant feature. | |||||||||
String | SYMBOL_TABLE | Property identifier: symbol table. | |||||||||
String | UNPARSED_ENTITY_CHECKING | Feature identifier: whether to ignore unparsed entity errors | |||||||||
String | USE_GRAMMAR_POOL_ONLY | Feature identifier: use grammar pool only | |||||||||
String | VALIDATE_ANNOTATIONS | Feature identifier: validate annotations. | |||||||||
String | VALIDATION | Feature identifier: validation. | |||||||||
String | VALIDATION_MANAGER | ||||||||||
String | XMLGRAMMAR_POOL | Property identifier: grammar pool. |
Fields | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
fAugPSVI | |||||||||||
fAugmentations | |||||||||||
fCurrentPSVI | current PSVI element info | ||||||||||
fDefaultValue | |||||||||||
fDoValidation | |||||||||||
fDocumentHandler | Document handler. | ||||||||||
fDocumentSource | |||||||||||
fDynamicValidation | |||||||||||
fEntityRef | |||||||||||
fEntityResolver | Entity resolver | ||||||||||
fExternalNoNamespaceSchema | |||||||||||
fExternalSchemas | |||||||||||
fFullChecking | |||||||||||
fGrammarPool | |||||||||||
fIdConstraint | |||||||||||
fInCDATA | |||||||||||
fJaxpSchemaSource | |||||||||||
fLocationPairs | |||||||||||
fMatcherStack | Stack of active XPath matchers for identity constraints. | ||||||||||
fMayMatchFieldMap | Map which is used to catch instance documents that try and match a field several times in the same scope. | ||||||||||
fNormalizeData | |||||||||||
fSchemaDynamicValidation | |||||||||||
fSchemaElementDefault | |||||||||||
fSymbolTable | Symbol table. | ||||||||||
fUseGrammarPoolOnly | |||||||||||
fValidationManager | |||||||||||
fValidationState | |||||||||||
fValueStoreCache | Cache of value stores for identity constraint fields. | ||||||||||
fXSDDescription | Schema Grammar Description passed, to give a chance to application to supply the Grammar | ||||||||||
fXSIErrorReporter | Error reporter. |
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Default constructor.
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Request to activate the specified field.
| |||||||||||
Character content.
| |||||||||||
Character content.
| |||||||||||
A comment.
| |||||||||||
Notifies of the presence of the DOCTYPE line in the document.
| |||||||||||
An empty element.
| |||||||||||
The end of a CDATA section.
| |||||||||||
The end of the document.
| |||||||||||
The end of an element.
| |||||||||||
This method notifies the end of a general entity.
| |||||||||||
Ends the value scope for the specified identity constraint.
| |||||||||||
Returns the document handler
| |||||||||||
Returns the document source
| |||||||||||
Returns the default state for a feature, or null if this
component does not want to report a default value for this
feature.
| |||||||||||
Returns the default state for a property, or null if this
component does not want to report a default value for this
property.
| |||||||||||
Returns a list of feature identifiers that are recognized by
this component.
| |||||||||||
Returns a list of property identifiers that are recognized by
this component.
| |||||||||||
Ignorable whitespace.
| |||||||||||
Returns whether the given field is permitted to match a value.
| |||||||||||
A processing instruction.
| |||||||||||
Resets the component.
| |||||||||||
Sets the document handler to receive information about the document.
| |||||||||||
Sets the document source
| |||||||||||
Sets the state of a feature.
| |||||||||||
Sets whether the given field is permitted to match a value.
| |||||||||||
Sets the value of a property.
| |||||||||||
The start of a CDATA section.
| |||||||||||
The start of the document.
| |||||||||||
The start of an element.
| |||||||||||
This method notifies the start of a general entity.
| |||||||||||
Start the value scope for the specified identity constraint.
| |||||||||||
Notifies of the presence of a TextDecl line in an entity.
| |||||||||||
Notifies of the presence of an XMLDecl line in the document.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
| |||||||||||
From interface
org.apache.xerces.impl.RevalidationHandler
| |||||||||||
From interface
org.apache.xerces.impl.xs.identity.FieldActivator
| |||||||||||
From interface
org.apache.xerces.xni.XMLDocumentHandler
| |||||||||||
From interface
org.apache.xerces.xni.parser.XMLComponent
| |||||||||||
From interface
org.apache.xerces.xni.parser.XMLDocumentSource
|
Feature identifier: whether to recognize java encoding names
Feature identifier: whether to continue parsing a schema after a fatal error is encountered
Feature identifier: dynamic validation.
Property identifier: entity resolver.
Property identifier: error reporter.
Feature: generate synthetic annotations
Feature identifier: honour all schemaLocations
Feature identifier: whether to ignore identity constraint errors
Feature identifier: whether to ignore ID/IDREF errors
Feature identifier: whether to ignore xsi:type attributes until a global element declaration is encountered
Property identifier: JAXP schema language.
Property identifier: JAXP schema source.
Feature identifier: expose schema normalized value
Property identifier: root type definition.
Feature identifier: augment PSVI
Feature identifier: send element default value via characters()
Feature identifier: schema full checking
Property identifier: schema location.
Property identifier: no namespace schema location.
Feature identifier: validation.
Feature identifier: standard uri conformant feature.
Property identifier: symbol table.
Feature identifier: whether to ignore unparsed entity errors
Feature identifier: use grammar pool only
Feature identifier: validate annotations.
Feature identifier: validation.
Property identifier: grammar pool.
Stack of active XPath matchers for identity constraints. All active XPath matchers are notified of startElement and endElement callbacks in order to perform their matches.
For each element with identity constraints, the selector of each identity constraint is activated. When the selector matches its XPath, then all the fields of the identity constraint are activated.
Note: Once the activation scope is left, the XPath matchers are automatically removed from the stack of active matchers and no longer receive callbacks.
Map which is used to catch instance documents that try and match a field several times in the same scope.
Cache of value stores for identity constraint fields.
Schema Grammar Description passed, to give a chance to application to supply the Grammar
Default constructor.
Request to activate the specified field. This method returns the matcher for the field.
field | The field to activate. |
---|---|
initialDepth | the 0-indexed depth in the instance document at which the Selector began to match. |
Character content.
data | The character data. |
---|---|
augs | Augmentations |
Character content.
text | The content. |
---|---|
augs | Additional information that may include infoset augmentations |
XNIException | Thrown by handler to signal an error. |
---|
A comment.
text | The text in the comment. |
---|---|
augs | Additional information that may include infoset augmentations |
XNIException | Thrown by application to signal an error. |
---|
Notifies of the presence of the DOCTYPE line in the document.
rootElement | The name of the root element. |
---|---|
publicId | The public identifier if an external DTD or null if the external DTD is specified using SYSTEM. |
systemId | The system identifier if an external DTD, null otherwise. |
augs | Additional information that may include infoset augmentations |
XNIException | Thrown by handler to signal an error. |
---|
An empty element.
element | The name of the element. |
---|---|
attributes | The element attributes. |
augs | Additional information that may include infoset augmentations |
XNIException | Thrown by handler to signal an error. |
---|
The end of a CDATA section.
augs | Additional information that may include infoset augmentations |
---|
XNIException | Thrown by handler to signal an error. |
---|
The end of the document.
augs | Additional information that may include infoset augmentations |
---|
XNIException | Thrown by handler to signal an error. |
---|
The end of an element.
element | The name of the element. |
---|---|
augs | Additional information that may include infoset augmentations |
XNIException | Thrown by handler to signal an error. |
---|
This method notifies the end of a general entity.
Note: This method is not called for entity references appearing as part of attribute values.
name | The name of the entity. |
---|---|
augs | Additional information that may include infoset augmentations |
XNIException | Thrown by handler to signal an error. |
---|
Ends the value scope for the specified identity constraint.
identityConstraint | The identity constraint. |
---|---|
initialDepth | the 0-indexed depth where the Selector began to match. |
Returns the default state for a feature, or null if this component does not want to report a default value for this feature.
featureId | The feature identifier. |
---|
Returns the default state for a property, or null if this component does not want to report a default value for this property.
propertyId | The property identifier. |
---|
Returns a list of feature identifiers that are recognized by this component. This method may return null if no features are recognized by this component.
Returns a list of property identifiers that are recognized by this component. This method may return null if no properties are recognized by this component.
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.
text | The ignorable whitespace. |
---|---|
augs | Additional information that may include infoset augmentations |
XNIException | Thrown by handler to signal an error. |
---|
Returns whether the given field is permitted to match a value.
field | The field that may be permitted to be matched. |
---|
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.
target | The target. |
---|---|
data | The data or null if none specified. |
augs | Additional information that may include infoset augmentations |
XNIException | Thrown by handler to signal an error. |
---|
Resets the component. The component can query the component manager about any features and properties that affect the operation of the component.
componentManager | The component manager. |
---|
XMLConfigurationException |
---|
Sets the document handler to receive information about the document.
Sets the state of a feature. This method is called by the component manager any time after reset when a feature changes state.
Note: Components should silently ignore features that do not affect the operation of the component.
featureId | The feature identifier. |
---|---|
state | The state of the feature. |
The component should not throw this exception. | |
The component should not throw this exception. | |
XMLConfigurationException |
Sets whether the given field is permitted to match a value. This should be used to catch instance documents that try and match a field several times in the same scope.
field | The field that may be permitted to be matched. |
---|---|
state | Boolean indiciating whether the field may be matched. |
Sets the value of a property. This method is called by the component manager any time after reset when a property changes value.
Note: Components should silently ignore properties that do not affect the operation of the component.
propertyId | The property identifier. |
---|---|
value | The value of the property. |
The component should not throw this exception. | |
The component should not throw this exception. | |
XMLConfigurationException |
The start of a CDATA section.
augs | Additional information that may include infoset augmentations |
---|
XNIException | Thrown by handler to signal an error. |
---|
The start of the document.
locator | The system identifier of the entity if the entity is external, null otherwise. |
---|---|
encoding | 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 | 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 | Additional information that may include infoset augmentations |
XNIException | Thrown by handler to signal an error. |
---|
The start of an element.
element | The name of the element. |
---|---|
attributes | The element attributes. |
augs | Additional information that may include infoset augmentations |
XNIException | Thrown by handler to signal an error. |
---|
This method notifies the start of a general entity.
Note: This method is not called for entity references appearing as part of attribute values.
name | The name of the general entity. |
---|---|
identifier | The resource identifier. |
encoding | 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). |
augs | Additional information that may include infoset augmentations |
XNIException | Thrown by handler to signal an error. |
---|
Start the value scope for the specified identity constraint. This method is called when the selector matches in order to initialize the value store.
identityConstraint | The identity constraint. |
---|---|
initialDepth | the depth at which the selector began matching |
Notifies of the presence of a TextDecl line in an entity. If present, this method will be called immediately following the startEntity call.
Note: This method will never be called for the document entity; it is only called for external general entities referenced in document content.
Note: This method is not called for entity references appearing as part of attribute values.
version | The XML version, or null if not specified. |
---|---|
encoding | The IANA encoding name of the entity. |
augs | Additional information that may include infoset augmentations |
XNIException | Thrown by handler to signal an error. |
---|
Notifies of the presence of an XMLDecl line in the document. If present, this method will be called immediately following the startDocument call.
version | The XML version. |
---|---|
encoding | The IANA encoding name of the document, or null if not specified. |
standalone | The standalone value, or null if not specified. |
augs | Additional information that may include infoset augmentations |
XNIException | Thrown by handler to signal an error. |
---|