KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > xerces > impl > XMLEntityHandler


1 /*
2  * Copyright 2000-2002,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 org.apache.xerces.xni.Augmentations;
20 import org.apache.xerces.xni.XMLResourceIdentifier;
21 import org.apache.xerces.xni.XNIException;
22
23 /**
24  * The entity handler interface defines methods to report information
25  * about the start and end of entities.
26  *
27  * @xerces.internal
28  *
29  * @see org.apache.xerces.impl.XMLEntityScanner
30  *
31  * @author Andy Clark, IBM
32  *
33  * @version $Id: XMLEntityHandler.java,v 1.10 2004/10/04 21:45:48 mrglavas Exp $
34  */

35 public interface XMLEntityHandler {
36
37     //
38
// XMLEntityHandler methods
39
//
40

41     /**
42      * This method notifies of the start of an entity. The DTD has the
43      * pseudo-name of "[dtd]" parameter entity names start with '%'; and
44      * general entities are just specified by their name.
45      *
46      * @param name The name of the entity.
47      * @param identifier The resource identifier.
48      * @param encoding The auto-detected IANA encoding name of the entity
49      * stream. This value will be null in those situations
50      * where the entity encoding is not auto-detected (e.g.
51      * internal entities or a document entity that is
52      * parsed from a java.io.Reader).
53      * @param augs Additional information that may include infoset augmentations
54      *
55      * @throws XNIException Thrown by handler to signal an error.
56      */

57     public void startEntity(String JavaDoc name,
58                             XMLResourceIdentifier identifier,
59                             String JavaDoc encoding, Augmentations augs) throws XNIException;
60
61     /**
62      * This method notifies the end of an entity. The DTD has the pseudo-name
63      * of "[dtd]" parameter entity names start with '%'; and general entities
64      * are just specified by their name.
65      *
66      * @param name The name of the entity.
67      * @param augs Additional information that may include infoset augmentations
68      *
69      * @throws XNIException Thrown by handler to signal an error.
70      */

71     public void endEntity(String JavaDoc name, Augmentations augs) throws XNIException;
72
73 } // interface XMLEntityHandler
74
Popular Tags