|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
AttributeCollection represents the collection of attributes available on a particular element node. It is modelled on the SAX2 Attributes interface, but is extended firstly to work with Saxon NamePools, and secondly to provide type information as required by the XPath 2.0 data model.
Method Summary | |
int |
getIndex(java.lang.String uri,
java.lang.String localname)
Get the index of an attribute (by name). |
int |
getIndexByFingerprint(int fingerprint)
Get the index, given the fingerprint |
int |
getLength()
Return the number of attributes in the list. |
int |
getLineNumber(int index)
Get the line number part of the location of an attribute, at a given index. |
java.lang.String |
getLocalName(int index)
Get the local name of an attribute (by position). |
int |
getLocationId(int index)
Get the locationID of an attribute (by position) |
int |
getNameCode(int index)
Get the namecode of an attribute (by position). |
java.lang.String |
getPrefix(int index)
Get the prefix of the name of an attribute (by position). |
int |
getProperties(int index)
Get the properties of an attribute (by position) |
java.lang.String |
getQName(int index)
Get the lexical QName of an attribute (by position). |
java.lang.String |
getSystemId(int index)
Get the systemId part of the location of an attribute, at a given index. |
int |
getTypeAnnotation(int index)
Get the type annotation of an attribute (by position). |
java.lang.String |
getURI(int index)
Get the namespace URI of an attribute (by position). |
java.lang.String |
getValue(int index)
Get the value of an attribute (by position). |
java.lang.String |
getValue(java.lang.String uri,
java.lang.String localname)
Get the value of an attribute (by name). |
java.lang.String |
getValueByFingerprint(int fingerprint)
Get the attribute value using its fingerprint |
boolean |
isId(int index)
Determine whether a given attribute has the is-ID property set |
Method Detail |
public int getLength()
public int getNameCode(int index)
index
- The position of the attribute in the list.
public int getTypeAnnotation(int index)
index
- The position of the attribute in the list.
net.sf.saxon.om.NodeInfo.IS_DTD_TYPE
represents a DTD-derived type.public int getLocationId(int index)
index
- The position of the attribute in the list.
LocationProvider
in order to obtain the
actual system identifier and line number of the relevant locationpublic java.lang.String getSystemId(int index)
Attribute location information is not available from a SAX parser, so this method is not useful for getting the location of an attribute in a source document. However, in a Saxon result document, the location information represents the location in the stylesheet of the instruction used to generate this attribute, which is useful for debugging.
index
- the required attribute
public int getLineNumber(int index)
Attribute location information is not available from a SAX parser, so this method is not useful for getting the location of an attribute in a source document. However, in a Saxon result document, the location information represents the location in the stylesheet of the instruction used to generate this attribute, which is useful for debugging.
index
- the required attribute
public int getProperties(int index)
index
- The position of the attribute in the list.
ReceiverOptions
. The
most interesting of these is {ReceiverOptions.DEFAULTED_ATTRIBUTE
,
which indicates an attribute that was added to an element as a result of schema validation.public java.lang.String getPrefix(int index)
index
- The position of the attribute in the list.
public java.lang.String getQName(int index)
index
- The position of the attribute in the list.
public java.lang.String getLocalName(int index)
index
- The position of the attribute in the list.
public java.lang.String getURI(int index)
index
- The position of the attribute in the list.
public int getIndex(java.lang.String uri, java.lang.String localname)
uri
- The namespace uri of the attribute.localname
- The local name of the attribute.
public int getIndexByFingerprint(int fingerprint)
public java.lang.String getValueByFingerprint(int fingerprint)
public java.lang.String getValue(java.lang.String uri, java.lang.String localname)
uri
- The namespace uri of the attribute.localname
- The local name of the attribute.
public java.lang.String getValue(int index)
index
- The position of the attribute in the list.
public boolean isId(int index)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |