01: package com.jclark.xml.parse;
02:
03: /**
04: * Information about the start of an element.
05: * @see com.jclark.xml.parse.base.Application#startElement
06: * @version $Revision: 1.9 $ $Date: 1998/12/28 08:12:30 $
07: */
08: public interface StartElementEvent extends LocatedEvent {
09: /**
10: * Returns the element type name.
11: */
12: String getName();
13:
14: /**
15: * Returns the number of attributes.
16: * Both specified and defaulted attributes are included.
17: * Implied attributes are not included.
18: */
19: int getAttributeCount();
20:
21: /**
22: * Returns the name of the attribute with index <code>i</code>.
23: * <code>i</code> must be greater than or equal to 0
24: * and less that the number of attributes returned
25: * by <code>getAttributeCount</code>.
26: */
27: String getAttributeName(int i);
28:
29: /**
30: * Returns the value of the attribute with index <code>i</code>.
31: * <code>i</code> must be greater than or equal to 0
32: * and less that the number of attributes returned
33: * by <code>getAttributeCount</code>.
34: * The value does not include the surrounding quotes.
35: */
36: String getAttributeValue(int i);
37:
38: /**
39: * Returns the value of the attribute with the specified name,
40: * Returns null if there is no such attribute, or if the
41: * value of the attribute was implied.
42: */
43: String getAttributeValue(String name);
44:
45: /**
46: * Returns the number of attributes which were specified.
47: * The specified attributes have indices less than the
48: * defaulted attributes.
49: */
50: int getAttributeSpecifiedCount();
51:
52: /**
53: * Returns the value of the specified attribute with index <code>i</code>
54: * before normalization.
55: */
56: String getAttributeUnnormalizedValue(int i);
57:
58: /**
59: * Returns the index of the ID attribute, or -1 if there is no ID
60: * attribute.
61: */
62: int getIdAttributeIndex();
63: }
|