Path: blob/aarch64-shenandoah-jdk8u272-b10/jaxp/src/javax/xml/transform/SourceLocator.java
32285 views
/*1* Copyright (c) 2000, 2005, Oracle and/or its affiliates. All rights reserved.2* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.3*4* This code is free software; you can redistribute it and/or modify it5* under the terms of the GNU General Public License version 2 only, as6* published by the Free Software Foundation. Oracle designates this7* particular file as subject to the "Classpath" exception as provided8* by Oracle in the LICENSE file that accompanied this code.9*10* This code is distributed in the hope that it will be useful, but WITHOUT11* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or12* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License13* version 2 for more details (a copy is included in the LICENSE file that14* accompanied this code).15*16* You should have received a copy of the GNU General Public License version17* 2 along with this work; if not, write to the Free Software Foundation,18* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.19*20* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA21* or visit www.oracle.com if you need additional information or have any22* questions.23*/2425package javax.xml.transform;2627/**28* This interface is primarily for the purposes of reporting where29* an error occurred in the XML source or transformation instructions.30*/31public interface SourceLocator {3233/**34* Return the public identifier for the current document event.35*36* <p>The return value is the public identifier of the document37* entity or of the external parsed entity in which the markup that38* triggered the event appears.</p>39*40* @return A string containing the public identifier, or41* null if none is available.42* @see #getSystemId43*/44public String getPublicId();4546/**47* Return the system identifier for the current document event.48*49* <p>The return value is the system identifier of the document50* entity or of the external parsed entity in which the markup that51* triggered the event appears.</p>52*53* <p>If the system identifier is a URL, the parser must resolve it54* fully before passing it to the application.</p>55*56* @return A string containing the system identifier, or null57* if none is available.58* @see #getPublicId59*/60public String getSystemId();6162/**63* Return the line number where the current document event ends.64*65* <p><strong>Warning:</strong> The return value from the method66* is intended only as an approximation for the sake of error67* reporting; it is not intended to provide sufficient information68* to edit the character content of the original XML document.</p>69*70* <p>The return value is an approximation of the line number71* in the document entity or external parsed entity where the72* markup that triggered the event appears.</p>73*74* @return The line number, or -1 if none is available.75* @see #getColumnNumber76*/77public int getLineNumber();7879/**80* Return the character position where the current document event ends.81*82* <p><strong>Warning:</strong> The return value from the method83* is intended only as an approximation for the sake of error84* reporting; it is not intended to provide sufficient information85* to edit the character content of the original XML document.</p>86*87* <p>The return value is an approximation of the column number88* in the document entity or external parsed entity where the89* markup that triggered the event appears.</p>90*91* @return The column number, or -1 if none is available.92* @see #getLineNumber93*/94public int getColumnNumber();95}969798