~ubuntu-branches/ubuntu/karmic/libjaxp1.3-java/karmic

« back to all changes in this revision

Viewing changes to javax/xml/transform/SourceLocator.java

  • Committer: Bazaar Package Importer
  • Author(s): Arnaud Vandyck
  • Date: 2006-08-03 10:30:58 UTC
  • Revision ID: james.westby@ubuntu.com-20060803103058-7jwwiqv9g8w9094d
Tags: upstream-1.3.03
ImportĀ upstreamĀ versionĀ 1.3.03

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * Copyright 2003-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
// $Id: SourceLocator.java 226183 2005-04-08 10:39:14Z neeraj $
 
18
 
 
19
package javax.xml.transform;
 
20
 
 
21
/**
 
22
 * This interface is primarily for the purposes of reporting where
 
23
 * an error occurred in the XML source or transformation instructions.
 
24
 */
 
25
public interface SourceLocator {
 
26
 
 
27
    /**
 
28
     * Return the public identifier for the current document event.
 
29
     *
 
30
     * <p>The return value is the public identifier of the document
 
31
     * entity or of the external parsed entity in which the markup that
 
32
     * triggered the event appears.</p>
 
33
     *
 
34
     * @return A string containing the public identifier, or
 
35
     *         null if none is available.
 
36
     * @see #getSystemId
 
37
     */
 
38
    public String getPublicId();
 
39
 
 
40
    /**
 
41
     * Return the system identifier for the current document event.
 
42
     *
 
43
     * <p>The return value is the system identifier of the document
 
44
     * entity or of the external parsed entity in which the markup that
 
45
     * triggered the event appears.</p>
 
46
     *
 
47
     * <p>If the system identifier is a URL, the parser must resolve it
 
48
     * fully before passing it to the application.</p>
 
49
     *
 
50
     * @return A string containing the system identifier, or null
 
51
     *         if none is available.
 
52
     * @see #getPublicId
 
53
     */
 
54
    public String getSystemId();
 
55
 
 
56
    /**
 
57
     * Return the line number where the current document event ends.
 
58
     *
 
59
     * <p><strong>Warning:</strong> The return value from the method
 
60
     * is intended only as an approximation for the sake of error
 
61
     * reporting; it is not intended to provide sufficient information
 
62
     * to edit the character content of the original XML document.</p>
 
63
     *
 
64
     * <p>The return value is an approximation of the line number
 
65
     * in the document entity or external parsed entity where the
 
66
     * markup that triggered the event appears.</p>
 
67
     *
 
68
     * @return The line number, or -1 if none is available.
 
69
     * @see #getColumnNumber
 
70
     */
 
71
    public int getLineNumber();
 
72
 
 
73
    /**
 
74
     * Return the character position where the current document event ends.
 
75
     *
 
76
     * <p><strong>Warning:</strong> The return value from the method
 
77
     * is intended only as an approximation for the sake of error
 
78
     * reporting; it is not intended to provide sufficient information
 
79
     * to edit the character content of the original XML document.</p>
 
80
     *
 
81
     * <p>The return value is an approximation of the column number
 
82
     * in the document entity or external parsed entity where the
 
83
     * markup that triggered the event appears.</p>
 
84
     *
 
85
     * @return The column number, or -1 if none is available.
 
86
     * @see #getLineNumber
 
87
     */
 
88
    public int getColumnNumber();
 
89
}