Source Home >> Java Source 1.6.0 >> javax.xml.transform.SourceLocator V 0.09
  • 01/*
  • 02 * The contents of this file are subject to the terms
  • 03 * of the Common Development and Distribution License
  • 04 * (the "License"). You may not use this file except
  • 05 * in compliance with the License.
  • 06 *
  • 07 * You can obtain a copy of the license at
  • 08 * https://jaxp.dev.java.net/CDDLv1.0.html.
  • 09 * See the License for the specific language governing
  • 10 * permissions and limitations under the License.
  • 11 *
  • 12 * When distributing Covered Code, include this CDDL
  • 13 * HEADER in each file and include the License file at
  • 14 * https://jaxp.dev.java.net/CDDLv1.0.html
  • 15 * If applicable add the following below this CDDL HEADER
  • 16 * with the fields enclosed by brackets "[]" replaced with
  • 17 * your own identifying information: Portions Copyright
  • 18 * [year] [name of copyright owner]
  • 19 */
  • 20
  • 21/*
  • 22 * $Id: XMLEntityReader.java,v 1.3 2005/11/03 17:02:21 jeffsuttor Exp $
  • 23 * @(#)SourceLocator.java 1.20 05/11/17
  • 24 *
  • 25 * Copyright 2006 Sun Microsystems, Inc. All Rights Reserved.
  • 26 */
  • 27
  • 28package javax.xml.transform;
  • 29
  • 30/**
  • 31 * This interface is primarily for the purposes of reporting where
  • 32 * an error occurred in the XML source or transformation instructions.
  • 33 */
  • 34public interface SourceLocator {
  • 35
  • 36 /**
  • 37 * Return the public identifier for the current document event.
  • 38 *
  • 39 * <p>The return value is the public identifier of the document
  • 40 * entity or of the external parsed entity in which the markup that
  • 41 * triggered the event appears.</p>
  • 42 *
  • 43 * @return A string containing the public identifier, or
  • 44 * null if none is available.
  • 45 * @see #getSystemId
  • 46 */
  • 47 public String getPublicId();
  • 48
  • 49 /**
  • 50 * Return the system identifier for the current document event.
  • 51 *
  • 52 * <p>The return value is the system identifier of the document
  • 53 * entity or of the external parsed entity in which the markup that
  • 54 * triggered the event appears.</p>
  • 55 *
  • 56 * <p>If the system identifier is a URL, the parser must resolve it
  • 57 * fully before passing it to the application.</p>
  • 58 *
  • 59 * @return A string containing the system identifier, or null
  • 60 * if none is available.
  • 61 * @see #getPublicId
  • 62 */
  • 63 public String getSystemId();
  • 64
  • 65 /**
  • 66 * Return the line number where the current document event ends.
  • 67 *
  • 68 * <p><strong>Warning:</strong> The return value from the method
  • 69 * is intended only as an approximation for the sake of error
  • 70 * reporting; it is not intended to provide sufficient information
  • 71 * to edit the character content of the original XML document.</p>
  • 72 *
  • 73 * <p>The return value is an approximation of the line number
  • 74 * in the document entity or external parsed entity where the
  • 75 * markup that triggered the event appears.</p>
  • 76 *
  • 77 * @return The line number, or -1 if none is available.
  • 78 * @see #getColumnNumber
  • 79 */
  • 80 public int getLineNumber();
  • 81
  • 82 /**
  • 83 * Return the character position where the current document event ends.
  • 84 *
  • 85 * <p><strong>Warning:</strong> The return value from the method
  • 86 * is intended only as an approximation for the sake of error
  • 87 * reporting; it is not intended to provide sufficient information
  • 88 * to edit the character content of the original XML document.</p>
  • 89 *
  • 90 * <p>The return value is an approximation of the column number
  • 91 * in the document entity or external parsed entity where the
  • 92 * markup that triggered the event appears.</p>
  • 93 *
  • 94 * @return The column number, or -1 if none is available.
  • 95 * @see #getLineNumber
  • 96 */
  • 97 public int getColumnNumber();
  • 98}

文件:SourceLocator.java
包名:javax.xml.transform
类名:SourceLocator
继承:
接口: