1 /*
2 * Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
3 * @LastModified: Sep 2017
4 */
5 /*
6 * Licensed to the Apache Software Foundation (ASF) under one or more
7 * contributor license agreements. See the NOTICE file distributed with
8 * this work for additional information regarding copyright ownership.
9 * The ASF licenses this file to You under the Apache License, Version 2.0
10 * (the "License"); you may not use this file except in compliance with
11 * the License. You may obtain a copy of the License at
12 *
13 * http://www.apache.org/licenses/LICENSE-2.0
14 *
15 * Unless required by applicable law or agreed to in writing, software
16 * distributed under the License is distributed on an "AS IS" BASIS,
17 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18 * See the License for the specific language governing permissions and
19 * limitations under the License.
20 */
21
22 package com.sun.org.apache.xerces.internal.impl.xs;
23
85 import org.w3c.dom.DOMStringList;
86 import org.w3c.dom.ls.LSInput;
87 import org.w3c.dom.ls.LSResourceResolver;
88 import org.xml.sax.InputSource;
89
90 /**
91 * This class implements xni.grammars.XMLGrammarLoader.
92 * It also serves as implementation of xs.XSLoader interface and DOMConfiguration interface.
93 *
94 * This class is designed to interact either with a proxy for a user application
95 * which wants to preparse schemas, or with our own Schema validator.
96 * It is hoped that none of these "external" classes will therefore need to communicate directly
97 * with XSDHandler in future.
98 * <p>This class only knows how to make XSDHandler do its thing.
99 * The caller must ensure that all its properties (schemaLocation, JAXPSchemaSource
100 * etc.) have been properly set.
101 *
102 * @xerces.internal
103 *
104 * @author Neil Graham, IBM
105 */
106
107 public class XMLSchemaLoader implements XMLGrammarLoader, XMLComponent, XSElementDeclHelper,
108 // XML Component API
109 XSLoader, DOMConfiguration {
110
111 // Feature identifiers:
112
113 /** Feature identifier: schema full checking*/
114 protected static final String SCHEMA_FULL_CHECKING =
115 Constants.XERCES_FEATURE_PREFIX + Constants.SCHEMA_FULL_CHECKING;
116
117 /** Feature identifier: continue after fatal error. */
118 protected static final String CONTINUE_AFTER_FATAL_ERROR =
119 Constants.XERCES_FEATURE_PREFIX + Constants.CONTINUE_AFTER_FATAL_ERROR_FEATURE;
120
121 /** Feature identifier: allow java encodings to be recognized when parsing schema docs. */
122 protected static final String ALLOW_JAVA_ENCODINGS =
123 Constants.XERCES_FEATURE_PREFIX + Constants.ALLOW_JAVA_ENCODINGS_FEATURE;
124
|
1 /*
2 * Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
3 */
4 /*
5 * Licensed to the Apache Software Foundation (ASF) under one or more
6 * contributor license agreements. See the NOTICE file distributed with
7 * this work for additional information regarding copyright ownership.
8 * The ASF licenses this file to You under the Apache License, Version 2.0
9 * (the "License"); you may not use this file except in compliance with
10 * the License. You may obtain a copy of the License at
11 *
12 * http://www.apache.org/licenses/LICENSE-2.0
13 *
14 * Unless required by applicable law or agreed to in writing, software
15 * distributed under the License is distributed on an "AS IS" BASIS,
16 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 * See the License for the specific language governing permissions and
18 * limitations under the License.
19 */
20
21 package com.sun.org.apache.xerces.internal.impl.xs;
22
84 import org.w3c.dom.DOMStringList;
85 import org.w3c.dom.ls.LSInput;
86 import org.w3c.dom.ls.LSResourceResolver;
87 import org.xml.sax.InputSource;
88
89 /**
90 * This class implements xni.grammars.XMLGrammarLoader.
91 * It also serves as implementation of xs.XSLoader interface and DOMConfiguration interface.
92 *
93 * This class is designed to interact either with a proxy for a user application
94 * which wants to preparse schemas, or with our own Schema validator.
95 * It is hoped that none of these "external" classes will therefore need to communicate directly
96 * with XSDHandler in future.
97 * <p>This class only knows how to make XSDHandler do its thing.
98 * The caller must ensure that all its properties (schemaLocation, JAXPSchemaSource
99 * etc.) have been properly set.
100 *
101 * @xerces.internal
102 *
103 * @author Neil Graham, IBM
104 * @LastModified: Sep 2017
105 */
106
107 public class XMLSchemaLoader implements XMLGrammarLoader, XMLComponent, XSElementDeclHelper,
108 // XML Component API
109 XSLoader, DOMConfiguration {
110
111 // Feature identifiers:
112
113 /** Feature identifier: schema full checking*/
114 protected static final String SCHEMA_FULL_CHECKING =
115 Constants.XERCES_FEATURE_PREFIX + Constants.SCHEMA_FULL_CHECKING;
116
117 /** Feature identifier: continue after fatal error. */
118 protected static final String CONTINUE_AFTER_FATAL_ERROR =
119 Constants.XERCES_FEATURE_PREFIX + Constants.CONTINUE_AFTER_FATAL_ERROR_FEATURE;
120
121 /** Feature identifier: allow java encodings to be recognized when parsing schema docs. */
122 protected static final String ALLOW_JAVA_ENCODINGS =
123 Constants.XERCES_FEATURE_PREFIX + Constants.ALLOW_JAVA_ENCODINGS_FEATURE;
124
|