01: package com.jclark.xml.parse;
02:
03: import java.net.URL;
04:
05: /**
06: * Information about the location of the parse of an XML document.
07: * @version $Revision: 1.1 $ $Date: 1998/05/25 03:40:30 $
08: */
09: public interface ParseLocation {
10:
11: /**
12: * Returns the location of the external entity being
13: * parsed in a form suitable for use in a message.
14: * Returns null if no location is available.
15: * This is typically a URI or a filename.
16: */
17: String getEntityLocation();
18:
19: /**
20: * Returns the URL to use as the base URL for resolving relative URLs
21: * contained in the entity being parsed.
22: */
23: public URL getEntityBase();
24:
25: /**
26: * Returns the line number of the character being parsed
27: * or -1 if no line number is available.
28: * The number of the first line is 1.
29: */
30: int getLineNumber();
31:
32: /**
33: * Returns the column number of the character being parsed
34: * or -1 if no column number is available.
35: * The number of the first column in a line is 0.
36: * A tab character is not treated specially.
37: */
38: int getColumnNumber();
39:
40: /**
41: * Returns the byte index of the first byte of the character being parsed
42: * or -1 if no byte index is available.
43: * The index of the first byte is 0.
44: */
45: public long getByteIndex();
46:
47: }
|