1 /* 2 * reserved comment block 3 * DO NOT REMOVE OR ALTER! 4 */ 5 /* 6 * Licensed to the Apache Software Foundation (ASF) under one or more 7 * contributor license agreements. See the NOTICE file distributed with 8 * this work for additional information regarding copyright ownership. 9 * The ASF licenses this file to You under the Apache License, Version 2.0 10 * (the "License"); you may not use this file except in compliance with 11 * the License. You may obtain a copy of the License at 12 * 13 * http://www.apache.org/licenses/LICENSE-2.0 14 * 15 * Unless required by applicable law or agreed to in writing, software 16 * distributed under the License is distributed on an "AS IS" BASIS, 17 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 * See the License for the specific language governing permissions and 19 * limitations under the License. 20 */ 21 22 package com.sun.org.apache.xerces.internal.xni; 23 24 /** 25 * Location information. 26 * 27 * @author Andy Clark, IBM 28 * 29 */ 30 public interface XMLLocator { 31 32 // 33 // XMLLocator methods 34 // 35 36 /** Returns the public identifier. */ getPublicId()37 public String getPublicId(); 38 39 /** Returns the literal system identifier. */ getLiteralSystemId()40 public String getLiteralSystemId(); 41 42 /** Returns the base system identifier. */ getBaseSystemId()43 public String getBaseSystemId(); 44 45 /** Returns the expanded system identifier. */ getExpandedSystemId()46 public String getExpandedSystemId(); 47 48 /** Returns the line number, or <code>-1</code> if no line number is available. */ getLineNumber()49 public int getLineNumber(); 50 51 /** Returns the column number, or <code>-1</code> if no column number is available. */ getColumnNumber()52 public int getColumnNumber(); 53 54 /** Returns the character offset, or <code>-1</code> if no character offset is available. */ getCharacterOffset()55 public int getCharacterOffset(); 56 57 /** 58 * Returns the encoding of the current entity. 59 * Note that, for a given entity, this value can only be 60 * considered final once the encoding declaration has been read (or once it 61 * has been determined that there is no such declaration) since, no encoding 62 * having been specified on the XMLInputSource, the parser 63 * will make an initial "guess" which could be in error. 64 */ getEncoding()65 public String getEncoding(); 66 67 /** 68 * Returns the XML version of the current entity. This will normally be the 69 * value from the XML or text declaration or defaulted by the parser. Note that 70 * that this value may be different than the version of the processing rules 71 * applied to the current entity. For instance, an XML 1.1 document may refer to 72 * XML 1.0 entities. In such a case the rules of XML 1.1 are applied to the entire 73 * document. Also note that, for a given entity, this value can only be considered 74 * final once the XML or text declaration has been read or once it has been 75 * determined that there is no such declaration. 76 */ getXMLVersion()77 public String getXMLVersion(); 78 79 80 } // interface XMLLocator 81