public class TinyAttributeCollection extends Object implements AttributeCollection
Constructor and Description |
---|
TinyAttributeCollection(TinyTree tree,
int element) |
Modifier and Type | Method and Description |
---|---|
int |
getIndex(String uri,
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.
|
String |
getLocalName(int index)
Get the local name of an attribute (by position).
|
Location |
getLocation(int index)
Get the location of an attribute (by position)
|
int |
getNameCode(int index)
Get the namecode of an attribute (by position).
|
NodeName |
getNodeName(int index)
Get the node name of an attribute (by position)
|
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)
|
String |
getQName(int index)
Get the lexical QName of an attribute (by position).
|
String |
getSystemId(int index)
Get the systemId part of the location of an attribute, at a given index.
|
SimpleType |
getTypeAnnotation(int index)
Get the type annotation of an attribute (by position).
|
String |
getURI(int index)
Get the namespace URI of an attribute (by position).
|
String |
getValue(int index)
Get the value of an attribute (by position).
|
String |
getValue(String uri,
String localname)
Get the value of an attribute (by name).
|
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
|
boolean |
isIdref(int index)
Determine whether a given attribute has the is-idref property set
|
public TinyAttributeCollection(TinyTree tree, int element)
public int getLength()
getLength
in interface AttributeCollection
public int getNameCode(int index)
getNameCode
in interface AttributeCollection
index
- The position of the attribute in the list.public NodeName getNodeName(int index)
getNodeName
in interface AttributeCollection
index
- The position of the attribute in the listpublic SimpleType getTypeAnnotation(int index)
getTypeAnnotation
in interface AttributeCollection
index
- The position of the attribute in the list.public Location getLocation(int index)
getLocation
in interface AttributeCollection
index
- The position of the attribute in the list.public 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.
getSystemId
in interface AttributeCollection
index
- the required attributepublic 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.
getLineNumber
in interface AttributeCollection
index
- the required attributepublic int getProperties(int index)
getProperties
in interface AttributeCollection
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 String getPrefix(int index)
getPrefix
in interface AttributeCollection
index
- The position of the attribute in the list.public String getQName(int index)
getQName
in interface AttributeCollection
index
- The position of the attribute in the list.public String getLocalName(int index)
getLocalName
in interface AttributeCollection
index
- The position of the attribute in the list.public String getURI(int index)
getURI
in interface AttributeCollection
index
- The position of the attribute in the list.public int getIndex(String uri, String localname)
getIndex
in interface AttributeCollection
uri
- The namespace uri of the attribute.localname
- The local name of the attribute.public int getIndexByFingerprint(int fingerprint)
getIndexByFingerprint
in interface AttributeCollection
fingerprint
- the NamePool fingerprint of the required attribute namepublic String getValueByFingerprint(int fingerprint)
getValueByFingerprint
in interface AttributeCollection
public String getValue(String uri, String localname)
getValue
in interface AttributeCollection
uri
- The namespace uri of the attribute.localname
- The local name of the attribute.public String getValue(int index)
getValue
in interface AttributeCollection
index
- The position of the attribute in the list.public boolean isId(int index)
isId
in interface AttributeCollection
public boolean isIdref(int index)
isIdref
in interface AttributeCollection
Copyright (c) 2004-2014 Saxonica Limited. All rights reserved.