6
|
1 |
/*
|
|
2 |
* reserved comment block
|
|
3 |
* DO NOT REMOVE OR ALTER!
|
|
4 |
*/
|
|
5 |
/*
|
|
6 |
* Copyright 2004 The Apache Software Foundation.
|
|
7 |
*
|
|
8 |
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
9 |
* you may not use this file except in compliance with the License.
|
|
10 |
* 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;
|
|
22 |
|
|
23 |
import java.io.IOException;
|
|
24 |
|
|
25 |
import com.sun.org.apache.xerces.internal.xni.XNIException;
|
|
26 |
import com.sun.org.apache.xerces.internal.xni.grammars.XMLDTDDescription;
|
|
27 |
import com.sun.org.apache.xerces.internal.xni.parser.XMLEntityResolver;
|
|
28 |
import com.sun.org.apache.xerces.internal.xni.parser.XMLInputSource;
|
|
29 |
|
|
30 |
/**
|
|
31 |
* <p>This interface extends <code>XMLEntityResolver</code> providing
|
|
32 |
* a method to resolve external subsets for documents which do not
|
|
33 |
* explicitly provide one. The application can register an object that
|
|
34 |
* implements this interface with the parser configuration. If registered,
|
|
35 |
* it will be queried to locate an external subset when none is provided,
|
|
36 |
* even for documents that do not contain DOCTYPE declarations. If the
|
|
37 |
* registered external subset resolver does not provide an external subset
|
|
38 |
* for a given document, it should return <code>null</code>.</p>
|
|
39 |
*
|
|
40 |
* @xerces.internal
|
|
41 |
*
|
|
42 |
* @author Michael Glavassevich, IBM
|
|
43 |
*
|
|
44 |
*/
|
|
45 |
public interface ExternalSubsetResolver
|
|
46 |
extends XMLEntityResolver {
|
|
47 |
|
|
48 |
//
|
|
49 |
// ExternalSubsetResolver methods
|
|
50 |
//
|
|
51 |
|
|
52 |
/**
|
|
53 |
* <p>Locates an external subset for documents which do not explicitly
|
|
54 |
* provide one. If no external subset is provided, this method should
|
|
55 |
* return <code>null</code>.</p>
|
|
56 |
*
|
|
57 |
* @param grammarDescription a description of the DTD
|
|
58 |
*
|
|
59 |
* @throws XNIException Thrown on general error.
|
|
60 |
* @throws IOException Thrown if resolved entity stream cannot be
|
|
61 |
* opened or some other i/o error occurs.
|
|
62 |
*/
|
|
63 |
public XMLInputSource getExternalSubset(XMLDTDDescription grammarDescription)
|
|
64 |
throws XNIException, IOException;
|
|
65 |
|
|
66 |
} // interface ExternalSubsetResolver
|