01: /*
02: * Licensed to the Apache Software Foundation (ASF) under one or more
03: * contributor license agreements. See the NOTICE file distributed with
04: * this work for additional information regarding copyright ownership.
05: * The ASF licenses this file to You under the Apache License, Version 2.0
06: * (the "License"); you may not use this file except in compliance with
07: * the License. You may obtain a copy of the License at
08: *
09: * http://www.apache.org/licenses/LICENSE-2.0
10: *
11: * Unless required by applicable law or agreed to in writing, software
12: * distributed under the License is distributed on an "AS IS" BASIS,
13: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14: * See the License for the specific language governing permissions and
15: * limitations under the License.
16: */
17:
18: package org.apache.xerces.xs;
19:
20: import org.w3c.dom.DOMConfiguration;
21: import org.w3c.dom.ls.LSInput;
22:
23: /**
24: * An interface that provides a method to load XML Schema documents. This
25: * interface uses the DOM Level 3 Core and Load and Save interfaces.
26: */
27: public interface XSLoader {
28: /**
29: * The configuration of a document. It maintains a table of recognized
30: * parameters. Using the configuration, it is possible to change the
31: * behavior of the load methods. The configuration may support the
32: * setting of and the retrieval of the following non-boolean parameters
33: * defined on the <code>DOMConfiguration</code> interface:
34: * <code>error-handler</code> (<code>DOMErrorHandler</code>) and
35: * <code>resource-resolver</code> (<code>LSResourceResolver</code>).
36: * <br> The following list of boolean parameters is defined:
37: * <dl>
38: * <dt>
39: * <code>"validate"</code></dt>
40: * <dd>
41: * <dl>
42: * <dt><code>true</code></dt>
43: * <dd>[required] (default) Validate an XML
44: * Schema during loading. If validation errors are found, the error
45: * handler is notified. </dd>
46: * <dt><code>false</code></dt>
47: * <dd>[optional] Do not
48: * report errors during the loading of an XML Schema document. </dd>
49: * </dl></dd>
50: * </dl>
51: */
52: public DOMConfiguration getConfig();
53:
54: /**
55: * Parses the content of XML Schema documents specified as the list of URI
56: * references. If the URI contains a fragment identifier, the behavior
57: * is not defined by this specification.
58: * @param uriList The list of URI locations.
59: * @return An XSModel representing the schema documents.
60: */
61: public XSModel loadURIList(StringList uriList);
62:
63: /**
64: * Parses the content of XML Schema documents specified as a list of
65: * <code>LSInput</code>s.
66: * @param is The list of <code>LSInput</code>s from which the XML
67: * Schema documents are to be read.
68: * @return An XSModel representing the schema documents.
69: */
70: public XSModel loadInputList(LSInputList is);
71:
72: /**
73: * Parse an XML Schema document from a location identified by a URI
74: * reference. If the URI contains a fragment identifier, the behavior is
75: * not defined by this specification.
76: * @param uri The location of the XML Schema document to be read.
77: * @return An XSModel representing this schema.
78: */
79: public XSModel loadURI(String uri);
80:
81: /**
82: * Parse an XML Schema document from a resource identified by a
83: * <code>LSInput</code> .
84: * @param is The <code>LSInput</code> from which the source
85: * document is to be read.
86: * @return An XSModel representing this schema.
87: */
88: public XSModel load(LSInput is);
89:
90: }
|