|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sf.saxon.tree.NodeImpl
net.sf.saxon.tree.AttributeImpl
final class AttributeImpl
A node in the XML parse tree representing an attribute. Note that this is generated only "on demand", when the attribute is selected by a select pattern.
Field Summary |
---|
Fields inherited from class net.sf.saxon.tree.NodeImpl |
---|
index, NODE_LETTER, parent |
Fields inherited from interface net.sf.saxon.om.NodeInfo |
---|
ALL_NAMESPACES, EMPTY_NAMESPACE_LIST, IS_DTD_TYPE, LOCAL_NAMESPACES, NO_NAMESPACES |
Fields inherited from interface net.sf.saxon.om.ValueRepresentation |
---|
EMPTY_VALUE_ARRAY |
Constructor Summary | |
---|---|
AttributeImpl(ElementImpl element,
int index)
Construct an Attribute node for the n'th attribute of a given element |
Method Summary | |
---|---|
void |
copy(Receiver out,
int whichNamespaces,
boolean copyAnnotations,
int locationId)
Copy this node to a given outputter |
void |
generateId(FastStringBuffer buffer)
Get sequential key. |
int |
getNameCode()
Get the name code, which enables the name to be located in the name pool |
NodeImpl |
getNextInDocument(NodeImpl anchor)
Get the next node in document order (skipping attributes) |
NodeInfo |
getNextSibling()
Get next sibling - not defined for attributes |
int |
getNodeKind()
Return the type of node. |
NodeImpl |
getPreviousInDocument()
Get the previous node in document order (skipping attributes) |
NodeInfo |
getPreviousSibling()
Get previous sibling - not defined for attributes |
protected long |
getSequenceNumber()
Get the node sequence number (in document order). |
java.lang.String |
getStringValue()
Return the character value of the node. |
int |
getTypeAnnotation()
Get the type annotation of this node, if any |
int |
hashCode()
The hashCode() method obeys the contract for hashCode(): that is, if two objects are equal (represent the same node) then they must have the same hashCode() |
boolean |
isSameNodeInfo(NodeInfo other)
Determine whether this is the same node as another node |
Methods inherited from class net.sf.saxon.tree.NodeImpl |
---|
atomize, compareOrder, equals, getAttributeValue, getBaseURI, getColumnNumber, getConfiguration, getDeclaredNamespaces, getDisplayName, getDocumentNumber, getDocumentRoot, getFingerprint, getFirstChild, getLastChild, getLineNumber, getLocalPart, getNamePool, getParent, getPrefix, getPublicId, getRoot, getStringValueCS, getSystemId, getTypedValue, getURI, hasChildNodes, iterateAxis, iterateAxis, sendNamespaceDeclarations, setSystemId |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AttributeImpl(ElementImpl element, int index)
element
- The element containing the relevant attributeindex
- The index position of the attribute starting at zeroMethod Detail |
---|
public int getNameCode()
getNameCode
in interface NodeInfo
getNameCode
in class NodeImpl
allocate
,
getFingerprint
public int getTypeAnnotation()
getTypeAnnotation
in interface NodeInfo
getTypeAnnotation
in class NodeImpl
The result is undefined for nodes other than elements and attributes.
public boolean isSameNodeInfo(NodeInfo other)
isSameNodeInfo
in interface NodeInfo
isSameNodeInfo
in class NodeImpl
other
- the node to be compared with this node
public int hashCode()
hashCode
in interface NodeInfo
hashCode
in class NodeImpl
protected long getSequenceNumber()
getSequenceNumber
in class NodeImpl
public final int getNodeKind()
Type
public java.lang.String getStringValue()
Item.getStringValueCS()
public NodeInfo getNextSibling()
getNextSibling
in class NodeImpl
public NodeInfo getPreviousSibling()
getPreviousSibling
in class NodeImpl
public NodeImpl getPreviousInDocument()
getPreviousInDocument
in class NodeImpl
public NodeImpl getNextInDocument(NodeImpl anchor)
getNextInDocument
in class NodeImpl
anchor
- the scan stops when it reaches a node that is not a descendant of the specified
anchor node
public void generateId(FastStringBuffer buffer)
generateId
in interface NodeInfo
generateId
in class NodeImpl
buffer
- public void copy(Receiver out, int whichNamespaces, boolean copyAnnotations, int locationId) throws XPathException
out
- the Receiver to which the node should be copiedwhichNamespaces
- in the case of an element, controls
which namespace nodes should be copied. Values are NodeInfo.NO_NAMESPACES
,
NodeInfo.LOCAL_NAMESPACES
, NodeInfo.ALL_NAMESPACES
copyAnnotations
- indicates whether the type annotations
of element and attribute nodes should be copiedlocationId
- If non-zero, identifies the location of the instruction
that requested this copy. If zero, indicates that the location information
for the original node is to be copied; in this case the Receiver must be
a LocationCopier
XPathException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |