|
|||||||||
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, IS_NILLED, 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). |
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 |
isId()
Determine whether this node has the is-id property |
boolean |
isIdref()
Determine whether this node has the is-idref property |
boolean |
isNilled()
Determine whether the node has the is-nilled property |
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, setSystemId |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface net.sf.saxon.om.NodeInfo |
---|
atomize, compareOrder, equals, getAttributeValue, getBaseURI, getConfiguration, getDeclaredNamespaces, getDisplayName, getDocumentNumber, getDocumentRoot, getFingerprint, getLineNumber, getLocalPart, getNamePool, getParent, getPrefix, getRoot, getSystemId, getURI, hasChildNodes, iterateAxis, iterateAxis |
Methods inherited from interface javax.xml.transform.Source |
---|
setSystemId |
Methods inherited from interface net.sf.saxon.om.Item |
---|
getStringValueCS, getTypedValue |
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 isId()
isId
in interface ExtendedNodeInfo
public boolean isIdref()
isIdref
in interface ExtendedNodeInfo
public boolean isNilled()
isNilled
in interface ExtendedNodeInfo
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()
getNodeKind
in interface NodeInfo
Type
public String getStringValue()
getStringValue
in interface Item
getStringValue
in interface NodeInfo
getStringValue
in interface ValueRepresentation
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
copy
in interface NodeInfo
out
- the Receiver to which the node should be copied. It is the caller's
responsibility to ensure that this Receiver is open before the method is called
(or that it is self-opening), and that it is closed after use.whichNamespaces
- 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 |