01: /*
02: * Copyright (c) 2002 World Wide Web Consortium,
03: * (Massachusetts Institute of Technology, Institut National de
04: * Recherche en Informatique et en Automatique, Keio University). All
05: * Rights Reserved. This program is distributed under the W3C's Software
06: * Intellectual Property License. This program is distributed in the
07: * hope that it will be useful, but WITHOUT ANY WARRANTY; without even
08: * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
09: * PURPOSE.
10: * See W3C License http://www.w3.org/Consortium/Legal/ for more details.
11: */
12:
13: package org.w3c.dom;
14:
15: /**
16: * <code>DOMLocator</code> is an interface that describes a location (e.g.
17: * where an error occured).
18: * <p>See also the <a href='http://www.w3.org/TR/2002/WD-DOM-Level-3-Core-20020114'>Document Object Model (DOM) Level 3 Core Specification</a>.
19: */
20: public interface DOMLocator {
21: /**
22: * The line number where the error occured, or -1 if there is no line
23: * number available.
24: */
25: public int getLineNumber();
26:
27: /**
28: * The column number where the error occured, or -1 if there is no column
29: * number available.
30: */
31: public int getColumnNumber();
32:
33: /**
34: * The byte or character offset into the input source, if we're parsing a
35: * file or a byte stream then this will be the byte offset into that
36: * stream, but if a character media is parsed then the offset will be
37: * the character offset. The value is <code>-1</code> if there is no
38: * offset available.
39: */
40: public int getOffset();
41:
42: /**
43: * The DOM Node where the error occured, or null if there is no Node
44: * available.
45: */
46: public Node getErrorNode();
47:
48: /**
49: * The URI where the error occured, or null if there is no URI available.
50: */
51: public String getUri();
52:
53: }
|