KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > xerces > xs > XSLoader


1 /*
2  * Copyright 2003,2004 The Apache Software Foundation.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */

16
17 package org.apache.xerces.xs;
18
19 import org.w3c.dom.DOMConfiguration JavaDoc;
20 import org.w3c.dom.ls.LSInput JavaDoc;
21
22 /**
23  * An interface that provides a method to load XML Schema documents. This
24  * interface uses the DOM Level 3 Core and Load and Save interfaces.
25  */

26 public interface XSLoader {
27     /**
28      * The configuration of a document. It maintains a table of recognized
29      * parameters. Using the configuration, it is possible to change the
30      * behavior of the load methods. The configuration may support the
31      * setting of and the retrieval of the following non-boolean parameters
32      * defined on the <code>DOMConfiguration</code> interface:
33      * <code>error-handler</code> (<code>DOMErrorHandler</code>) and
34      * <code>resource-resolver</code> (<code>LSResourceResolver</code>).
35      * <br> The following list of boolean parameters is defined:
36      * <dl>
37      * <dt>
38      * <code>"validate"</code></dt>
39      * <dd>
40      * <dl>
41      * <dt><code>true</code></dt>
42      * <dd>[required] (default) Validate an XML
43      * Schema during loading. If validation errors are found, the error
44      * handler is notified. </dd>
45      * <dt><code>false</code></dt>
46      * <dd>[optional] Do not
47      * report errors during the loading of an XML Schema document. </dd>
48      * </dl></dd>
49      * </dl>
50      */

51     public DOMConfiguration JavaDoc getConfig();
52
53     /**
54      * Parses the content of XML Schema documents specified as the list of URI
55      * references. If the URI contains a fragment identifier, the behavior
56      * is not defined by this specification.
57      * @param uri The list of URI locations.
58      * @return An XSModel representing the schema documents.
59      */

60     public XSModel loadURIList(StringList uriList);
61
62     /**
63      * Parses the content of XML Schema documents specified as a list of
64      * <code>LSInput</code>s.
65      * @param is The list of <code>LSInput</code>s from which the XML
66      * Schema documents are to be read.
67      * @return An XSModel representing the schema documents.
68      */

69     public XSModel loadInputList(LSInputList is);
70
71     /**
72      * Parse an XML Schema document from a location identified by a URI
73      * reference. If the URI contains a fragment identifier, the behavior is
74      * not defined by this specification.
75      * @param uri The location of the XML Schema document to be read.
76      * @return An XSModel representing this schema.
77      */

78     public XSModel loadURI(String JavaDoc uri);
79
80     /**
81      * Parse an XML Schema document from a resource identified by a
82      * <code>LSInput</code> .
83      * @param is The <code>DOMInputSource</code> from which the source
84      * document is to be read.
85      * @return An XSModel representing this schema.
86      */

87     public XSModel load(LSInput JavaDoc is);
88
89 }
90
Popular Tags