KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > xerces > xni > XMLLocator


1 /*
2  * Copyright 2001-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.xni;
18
19 /**
20  * Location information.
21  *
22  * @author Andy Clark, IBM
23  *
24  * @version $Id: XMLLocator.java,v 1.11 2004/09/01 03:00:15 mrglavas Exp $
25  */

26 public interface XMLLocator {
27
28     //
29
// XMLLocator methods
30
//
31

32     /** Returns the public identifier. */
33     public String JavaDoc getPublicId();
34     
35     /** Returns the literal system identifier. */
36     public String JavaDoc getLiteralSystemId();
37     
38     /** Returns the base system identifier. */
39     public String JavaDoc getBaseSystemId();
40     
41     /** Returns the expanded system identifier. */
42     public String JavaDoc getExpandedSystemId();
43     
44     /** Returns the line number, or <code>-1</code> if no line number is available. */
45     public int getLineNumber();
46   
47     /** Returns the column number, or <code>-1</code> if no column number is available. */
48     public int getColumnNumber();
49     
50     /** Returns the character offset, or <code>-1</code> if no character offset is available. */
51     public int getCharacterOffset();
52
53     /**
54      * Returns the encoding of the current entity.
55      * Note that, for a given entity, this value can only be
56      * considered final once the encoding declaration has been read (or once it
57      * has been determined that there is no such declaration) since, no encoding
58      * having been specified on the XMLInputSource, the parser
59      * will make an initial "guess" which could be in error.
60      */

61     public String JavaDoc getEncoding();
62     
63     /**
64      * Returns the XML version of the current entity. This will normally be the
65      * value from the XML or text declaration or defaulted by the parser. Note that
66      * that this value may be different than the version of the processing rules
67      * applied to the current entity. For instance, an XML 1.1 document may refer to
68      * XML 1.0 entities. In such a case the rules of XML 1.1 are applied to the entire
69      * document. Also note that, for a given entity, this value can only be considered
70      * final once the XML or text declaration has been read or once it has been
71      * determined that there is no such declaration.
72      */

73     public String JavaDoc getXMLVersion();
74
75
76 } // interface XMLLocator
77
Popular Tags