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 org.apache.xerces.impl; 18 19 import java.io.IOException; 20 21 import org.apache.xerces.xni.XNIException; 22 import org.apache.xerces.xni.grammars.XMLDTDDescription; 23 import org.apache.xerces.xni.parser.XMLEntityResolver; 24 import org.apache.xerces.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 * @xerces.internal 37 * 38 * @author Michael Glavassevich, IBM 39 * 40 * @version $Id: ExternalSubsetResolver.java,v 1.2 2004/10/04 21:45:49 mrglavas Exp $ 41 */ 42 public interface ExternalSubsetResolver 43 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(XMLDTDDescription grammarDescription) 61 throws XNIException, IOException; 62 63 } // interface ExternalSubsetResolver 64