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.impl;
19:
20: import java.io.IOException;
21:
22: import org.apache.xerces.xni.XNIException;
23: import org.apache.xerces.xni.grammars.XMLDTDDescription;
24: import org.apache.xerces.xni.parser.XMLEntityResolver;
25: import org.apache.xerces.xni.parser.XMLInputSource;
26:
27: /**
28: * <p>This interface extends <code>XMLEntityResolver</code> providing
29: * a method to resolve external subsets for documents which do not
30: * explicitly provide one. The application can register an object that
31: * implements this interface with the parser configuration. If registered,
32: * it will be queried to locate an external subset when none is provided,
33: * even for documents that do not contain DOCTYPE declarations. If the
34: * registered external subset resolver does not provide an external subset
35: * for a given document, it should return <code>null</code>.</p>
36: *
37: * @xerces.internal
38: *
39: * @author Michael Glavassevich, IBM
40: *
41: * @version $Id: ExternalSubsetResolver.java 446761 2006-09-15 21:59:29Z mrglavas $
42: */
43: public interface ExternalSubsetResolver extends XMLEntityResolver {
44:
45: //
46: // ExternalSubsetResolver methods
47: //
48:
49: /**
50: * <p>Locates an external subset for documents which do not explicitly
51: * provide one. If no external subset is provided, this method should
52: * return <code>null</code>.</p>
53: *
54: * @param grammarDescription a description of the DTD
55: *
56: * @throws XNIException Thrown on general error.
57: * @throws IOException Thrown if resolved entity stream cannot be
58: * opened or some other i/o error occurs.
59: */
60: public XMLInputSource getExternalSubset(
61: XMLDTDDescription grammarDescription) throws XNIException,
62: IOException;
63:
64: } // interface ExternalSubsetResolver
|