An implementation of XSLoader which wraps XMLSchemaLoader.
| Modifier and Type | Class and Description |
|---|---|
| private static class | XSLoaderImpl.XSGrammarMerger
Grammar pool which merges grammars from the same namespace into one. |
| Modifier and Type | Field and Description |
|---|---|
| private final XSGrammarPool | fGrammarPool
Grammar pool. |
| private final XMLSchemaLoader | fSchemaLoader
Schema loader. |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public boolean | canSetParameter(String
The name of the parameter to check. name, Object An object. if value)null, the returned value is
true.Implements org. |
| public DOMConfiguration | |
| public Object | getParameter(String
The name of the parameter. name)Implements org. |
| public DOMStringList | getParameterNames()
Implements org. DOMConfiguration object and for which at least one value
can be set by the application.
|
| public XSModel | Returns: An XSModel representing this schema.The is)LSInput from which the source
document is to be read.Implements org. LSInput .
|
| public XSModel | Returns: An XSModel representing the schema documents.The list of is)LSInputs from which the XML
Schema documents are to be read.Implements org. LSInputs.
|
| public XSModel | Returns: An XSModel representing this schema.The location of the XML Schema document to be read. uri)Implements org. |
| public XSModel | Returns: An XSModel representing the schema documents.The list of URI locations. uriList)Implements org. |
| public void | setParameter(String
The name of the parameter to set. name, Object The new value or value)null if the user wishes to
unset the parameter. While the type of the value parameter is
defined as DOMUserData, the object type must match the
type defined by the definition of the parameter. For example, if
the parameter is "error-handler", the value must be of type
DOMErrorHandler.Implements org. |
| fGrammarPool | back to summary |
|---|---|
| private final XSGrammarPool fGrammarPool Grammar pool. Need this to prevent us from getting two grammars from the same namespace. | |
| fSchemaLoader | back to summary |
|---|---|
| private final XMLSchemaLoader fSchemaLoader Schema loader. | |
| XSLoaderImpl | back to summary |
|---|---|
| public XSLoaderImpl() No-args constructor. | |
| canSetParameter | back to summary |
|---|---|
| public boolean canSetParameter(String name, Object value) Implements org. Doc from org. Check if setting a parameter to a specific value is supported.
| |
| getConfig | back to summary |
|---|---|
| public DOMConfiguration getConfig() Implements org. 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
| |
| getParameter | back to summary |
|---|---|
| public Object getParameter(String name) throws DOMException Implements org. Doc from org. Return the value of a parameter if known.
| |
| getParameterNames | back to summary |
|---|---|
| public DOMStringList getParameterNames() Implements org. Doc from org. The list of the parameters supported by this
| |
| load | back to summary |
|---|---|
| public XSModel load(LSInput is) Implements org. Parse an XML Schema document from a resource identified by a
| |
| loadInputList | back to summary |
|---|---|
| public XSModel loadInputList(LSInputList is) Implements org. Parses the content of XML Schema documents specified as a list of
| |
| loadURI | back to summary |
|---|---|
| public XSModel loadURI(String uri) Implements org. 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. | |
| loadURIList | back to summary |
|---|---|
| public XSModel loadURIList(StringList uriList) Implements org. 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.
| |
| setParameter | back to summary |
|---|---|
| public void setParameter(String name, Object value) throws DOMException Implements org. Doc from org. Set the value of a parameter.
| |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public boolean | containsGrammar(XMLGrammarDescription
The Grammar Description. desc)Overrides org. |
| public Grammar | getGrammar(XMLGrammarDescription
The Grammar Description. desc)Overrides org. |
| private void | |
| public void | putGrammar(Grammar
The Grammar. grammar)Overrides org. |
| public Grammar | retrieveGrammar(XMLGrammarDescription
The description of the Grammar being requested. desc)Overrides org. Implements org. This method requests that the application retrieve a grammar corresponding to the given GrammarIdentifier from its cache. |
| public Grammar[] | retrieveInitialGrammarSet(String
the type of the grammar, from the
grammarType)org.apache.xerces.xni.grammars.Grammar interface.Overrides org. Implements org. retrieve the initial known set of grammars. |
| private SchemaGrammar |
| XSGrammarMerger | back to summary |
|---|---|
| public XSGrammarMerger() | |
| containsGrammar | back to summary |
|---|---|
| public boolean containsGrammar(XMLGrammarDescription desc) Overrides org. Doc from org. Returns true if the grammar pool contains a grammar associated to the specified grammar description. Currently, the root element name is used as the key for DTD grammars and the target namespace is used as the key for Schema grammars.
| |
| getGrammar | back to summary |
|---|---|
| public Grammar getGrammar(XMLGrammarDescription desc) Overrides org. Doc from org. Returns the grammar associated to the specified grammar description. Currently, the root element name is used as the key for DTD grammars and the target namespace is used as the key for Schema grammars.
| |
| mergeSchemaGrammars | back to summary |
|---|---|
| private void mergeSchemaGrammars(SchemaGrammar cachedGrammar, SchemaGrammar newGrammar) | |
| putGrammar | back to summary |
|---|---|
| public void putGrammar(Grammar grammar) Overrides org. Doc from org. Puts the specified grammar into the grammar pool and associates it to its root element name or its target namespace.
| |
| retrieveGrammar | back to summary |
|---|---|
| public Grammar retrieveGrammar(XMLGrammarDescription desc) Overrides org. Implements org. Doc from org. This method requests that the application retrieve a grammar corresponding to the given GrammarIdentifier from its cache. If it cannot do so it must return null; the parser will then call the EntityResolver. An application must not call its EntityResolver itself from this method; this may result in infinite recursions.
| |
| retrieveInitialGrammarSet | back to summary |
|---|---|
| public Grammar[] retrieveInitialGrammarSet(String grammarType) Overrides org. Implements org. Doc from org. retrieve the initial known set of grammars. this method is called by a validator before the validation starts. the application can provide an initial set of grammars available to the current validation attempt. | |
| toSchemaGrammar | back to summary |
|---|---|
| private SchemaGrammar toSchemaGrammar(Grammar grammar) | |