java.lang.Object | |
↳ | org.apache.xerces.impl.xs.XMLSchemaLoader |
This class implements xni.grammars.XMLGrammarLoader. It also serves as implementation of xs.XSLoader interface and DOMConfiguration interface. This class is designed to interact either with a proxy for a user application which wants to preparse schemas, or with our own Schema validator. It is hoped that none of these "external" classes will therefore need to communicate directly with XSDHandler in future.
This class only knows how to make XSDHandler do its thing. The caller must ensure that all its properties (schemaLocation, JAXPSchemaSource etc.) have been properly set.
Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
String | ALLOW_JAVA_ENCODINGS | Feature identifier: allow java encodings to be recognized when parsing schema docs. | |||||||||
String | AUGMENT_PSVI | ||||||||||
String | CONTINUE_AFTER_FATAL_ERROR | Feature identifier: continue after fatal error. | |||||||||
String | DISALLOW_DOCTYPE | Feature: disallow doctype | |||||||||
String | ENTITY_MANAGER | ||||||||||
String | ENTITY_RESOLVER | Property identifier: entity resolver. | |||||||||
String | ERROR_HANDLER | Property identifier: error handler. | |||||||||
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 | JAXP_SCHEMA_SOURCE | Property identifier: JAXP schema source. | |||||||||
String | PARSER_SETTINGS | ||||||||||
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 | SECURITY_MANAGER | ||||||||||
String | STANDARD_URI_CONFORMANT_FEATURE | Feature identifier: standard uri conformant feature. | |||||||||
String | SYMBOL_TABLE | Property identifier: symbol table. | |||||||||
String | VALIDATE_ANNOTATIONS | Feature identifier: validate annotations. | |||||||||
String | XMLGRAMMAR_POOL | Property identifier: grammar pool. |
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
The configuration of a document.
| |||||||||||
Returns the registered entity resolver.
| |||||||||||
Returns the registered error handler.
| |||||||||||
Returns the state of a feature.
| |||||||||||
Returns the default state for a feature, or null if this
component does not want to report a default value for this
feature.
| |||||||||||
Return the Locale the XMLGrammarLoader is using.
| |||||||||||
Returns the state of a property.
| |||||||||||
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 XMLGrammarLoader.
| |||||||||||
Returns a list of property identifiers that are recognized by
this XMLGrammarLoader.
| |||||||||||
Parse an XML Schema document from a resource identified by a
LSInput . | |||||||||||
Returns a Grammar object by parsing the contents of the
entities pointed to by sources.
| |||||||||||
Returns a Grammar object by parsing the contents of the
entity pointed to by source.
| |||||||||||
Parses the content of XML Schema documents specified as a list of
LSInput s. | |||||||||||
Parse an XML Schema document from a location identified by a URI
reference.
| |||||||||||
Parses the content of XML Schema documents specified as the list of URI
references.
| |||||||||||
Resets the component.
| |||||||||||
This method tries to resolve location of the given schema.
| |||||||||||
Sets the entity resolver.
| |||||||||||
Sets the error handler.
| |||||||||||
Sets the state of a feature.
| |||||||||||
Set the locale to use for messages.
| |||||||||||
Sets the state of a property.
| |||||||||||
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
| |||||||||||
From interface
org.apache.xerces.xni.grammars.XMLGrammarLoader
| |||||||||||
From interface
org.apache.xerces.xni.parser.XMLComponent
| |||||||||||
From interface
org.apache.xerces.xs.XSLoader
| |||||||||||
From interface
org.w3c.dom.DOMConfiguration
|
Feature identifier: allow java encodings to be recognized when parsing schema docs.
Feature identifier: continue after fatal error.
Feature: disallow doctype
Property identifier: entity resolver.
Property identifier: error handler.
Property identifier: error reporter.
Feature: generate synthetic annotations
Feature identifier: honour all schemaLocations
Property identifier: JAXP schema source.
Feature identifier: schema full checking
Property identifier: schema location.
Property identifier: no namespace schema location.
Feature identifier: standard uri conformant feature.
Property identifier: symbol table.
Feature identifier: validate annotations.
Property identifier: grammar pool.
The configuration of a document. It maintains a table of recognized
parameters. Using the configuration, it is possible to change the
behavior of the load methods. The configuration may support the
setting of and the retrieval of the following non-boolean parameters
defined on the DOMConfiguration
interface:
error-handler
(DOMErrorHandler
) and
resource-resolver
(LSResourceResolver
).
The following list of boolean parameters is defined:
"validate"
true
false
Returns the state of a feature.
featureId | The feature identifier. |
---|
XMLConfigurationException | Thrown on configuration error. |
---|
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 state of a property.
propertyId | The property identifier. |
---|
XMLConfigurationException | Thrown on configuration error. |
---|
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 XMLGrammarLoader. This method may return null if no features are recognized.
Returns a list of property identifiers that are recognized by this XMLGrammarLoader. This method may return null if no properties are recognized.
Parse an XML Schema document from a resource identified by a
LSInput
.
is | The LSInput from which the source
document is to be read. |
---|
Returns a Grammar object by parsing the contents of the entities pointed to by sources.
source | the locations of the entity which forms the staring point of the grammars to be constructed |
---|
IOException | when a problem is encounted reading the entity |
---|---|
XNIException | when a condition arises (such as a FatalError) that requires parsing of the entity be terminated |
Returns a Grammar object by parsing the contents of the entity pointed to by source.
source | the location of the entity which forms the starting point of the grammar to be constructed. |
---|
IOException | When a problem is encountered reading the entity XNIException When a condition arises (such as a FatalError) that requires parsing of the entity be terminated. |
---|---|
XNIException |
Parses the content of XML Schema documents specified as a list of
LSInput
s.
is | The list of LSInput s from which the XML
Schema documents are to be read. |
---|
Parse an XML Schema document from a location identified by a URI reference. If the URI contains a fragment identifier, the behavior is not defined by this specification.
uri | The location of the XML Schema document to be read. |
---|
Parses the content of XML Schema documents specified as the list of URI references. If the URI contains a fragment identifier, the behavior is not defined by this specification.
uriList | The list of URI locations. |
---|
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 |
---|
This method tries to resolve location of the given schema. The loader stores the namespace/location pairs in a hashtable (use "" as the namespace of absent namespace). When resolving an entity, loader first tries to find in the hashtable whether there is a value for that namespace, if so, pass that location value to the user-defined entity resolver.
IOException |
---|
Sets the entity resolver.
entityResolver | The new entity resolver. |
---|
Sets the error handler.
errorHandler | The error handler. |
---|
Sets the state of a feature.
featureId | The feature identifier. |
---|---|
state | The state of the feature. |
XMLConfigurationException | Thrown when a feature is not recognized or cannot be set. |
---|
Set the locale to use for messages.
locale | The locale object to use for localization of messages. |
---|
XNIException | Thrown if the parser does not support the specified locale. |
---|
Sets the state of a property.
propertyId | The property identifier. |
---|---|
state | The state of the property. |
XMLConfigurationException | Thrown when a property is not recognized or cannot be set. |
---|