KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > sun > org > apache > xerces > internal > impl > ExternalSubsetResolver


1 /*
2  * Copyright 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 com.sun.org.apache.xerces.internal.impl;
18
19 import java.io.IOException JavaDoc;
20
21 import com.sun.org.apache.xerces.internal.xni.XNIException;
22 import com.sun.org.apache.xerces.internal.xni.grammars.XMLDTDDescription;
23 import com.sun.org.apache.xerces.internal.xni.parser.XMLEntityResolver;
24 import com.sun.org.apache.xerces.internal.xni.parser.XMLInputSource;
25
26 /**
27  * <p>This interface extends <code>XMLEntityResolver</code> providing
28  * a method to resolve external subsets for documents which do not
29  * explicitly provide one. The application can register an object that
30  * implements this interface with the parser configuration. If registered,
31  * it will be queried to locate an external subset when none is provided,
32  * even for documents that do not contain DOCTYPE declarations. If the
33  * registered external subset resolver does not provide an external subset
34  * for a given document, it should return <code>null</code>.</p>
35  *
36  * @author Michael Glavassevich, IBM
37  *
38  * @version $Id: ExternalSubsetResolver.java,v 1.1.1.1 2004/05/04 10:21:42 vk112360 Exp $
39  */

40 public interface ExternalSubsetResolver
41     extends XMLEntityResolver {
42     
43     //
44
// ExternalSubsetResolver methods
45
//
46

47     /**
48      * <p>Locates an external subset for documents which do not explicitly
49      * provide one. If no external subset is provided, this method should
50      * return <code>null</code>.</p>
51      *
52      * @param grammarDescription a description of the DTD
53      *
54      * @throws XNIException Thrown on general error.
55      * @throws IOException Thrown if resolved entity stream cannot be
56      * opened or some other i/o error occurs.
57      */

58     public XMLInputSource getExternalSubset(XMLDTDDescription grammarDescription)
59         throws XNIException, IOException JavaDoc;
60
61 } // interface ExternalSubsetResolver
62
Popular Tags