Class AttributeImpl
java.lang.Object
com.icl.saxon.om.AbstractNode
com.icl.saxon.tree.NodeImpl
com.icl.saxon.tree.AttributeImpl
- All Implemented Interfaces:
NodeInfo, DOMLocator, Source, SourceLocator, Attr, Node
-
Field Summary
Fields inherited from class NodeImpl
emptyArray, index, parentFields inherited from class AbstractNode
NODE_LETTERFields inherited from interface Node
ATTRIBUTE_NODE, CDATA_SECTION_NODE, COMMENT_NODE, DOCUMENT_FRAGMENT_NODE, DOCUMENT_NODE, DOCUMENT_POSITION_CONTAINED_BY, DOCUMENT_POSITION_CONTAINS, DOCUMENT_POSITION_DISCONNECTED, DOCUMENT_POSITION_FOLLOWING, DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC, DOCUMENT_POSITION_PRECEDING, DOCUMENT_TYPE_NODE, ELEMENT_NODE, ENTITY_NODE, ENTITY_REFERENCE_NODE, NOTATION_NODE, PROCESSING_INSTRUCTION_NODE, TEXT_NODE -
Constructor Summary
ConstructorsConstructorDescriptionAttributeImpl(ElementImpl element, int index) Construct an Attribute node for the n'th attribute of a given element -
Method Summary
Modifier and TypeMethodDescriptionvoidCopy this node to a given outputterGet sequential key.intGet the name code, which enables the name to be located in the name poolgetNextInDocument(NodeImpl anchor) Get the next node in document order (skipping attributes)Get next sibling - not defined for attributesfinal shortReturn the type of node.Get the previous node in document order (skipping attributes)Get previous sibling - not defined for attributesprotected longGet the node sequence number (in document order).Return the character value of the node.booleanisSameNodeInfo(NodeInfo other) Determine whether this is the same node as another nodeMethods inherited from class NodeImpl
compareOrder, getAttributes, getAttributeValue, getAttributeValue, getBaseURI, getChildNodes, getDisplayName, getDocumentElement, getDocumentRoot, getEnumeration, getFingerprint, getFirstChild, getLastChild, getLineNumber, getLocalName, getNamePool, getOriginatingNode, getParent, getPrefix, getSystemId, getURI, hasAttributes, hasChildNodes, outputNamespaceNodes, removeNode, setSystemIdMethods inherited from class AbstractNode
appendChild, appendData, cloneNode, compareDocumentPosition, copyStringValue, createAttribute, createAttributeNS, createCDATASection, createComment, createDocumentFragment, createElement, createElementNS, createEntityReference, createProcessingInstruction, createTextNode, deleteData, disallowUpdate, getAttribute, getAttributeNode, getAttributeNodeNS, getAttributeNS, getColumnNumber, getData, getDoctype, getElementById, getElementsByTagName, getElementsByTagNameNS, getFeature, getImplementation, getLength, getName, getNamespaceURI, getNodeName, getNodeValue, getOwnerDocument, getOwnerElement, getParentNode, getPublicId, getSchemaTypeInfo, getSpecified, getTagName, getTextContent, getUserData, getValue, getWholeText, hasAttribute, hasAttributeNS, importNode, insertBefore, insertData, isDefaultNamespace, isElementContentWhitespace, isEqualNode, isId, isSameNode, isSupported, lookupNamespaceURI, lookupPrefix, normalize, removeAttribute, removeAttributeNode, removeAttributeNS, removeChild, replaceChild, replaceData, replaceWholeText, setAttributeNode, setAttributeNodeNS, setAttributeNS, setData, setIdAttribute, setIdAttributeNode, setIdAttributeNS, setNodeValue, setPrefix, setTextContent, setUserData, setValue, splitText, substringData, supportsMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface Attr
getName, getOwnerElement, getSchemaTypeInfo, getSpecified, getValue, isId, setValueMethods inherited from interface Node
appendChild, cloneNode, compareDocumentPosition, getAttributes, getBaseURI, getChildNodes, getFeature, getFirstChild, getLastChild, getLocalName, getNamespaceURI, getNodeName, getNodeValue, getOwnerDocument, getParentNode, getPrefix, getTextContent, getUserData, hasAttributes, hasChildNodes, insertBefore, isDefaultNamespace, isEqualNode, isSameNode, isSupported, lookupNamespaceURI, lookupPrefix, normalize, removeChild, replaceChild, setNodeValue, setPrefix, setTextContent, setUserData
-
Constructor Details
-
AttributeImpl
Construct an Attribute node for the n'th attribute of a given element- Parameters:
element- The element containing the relevant attributeindex- The index position of the attribute starting at zero
-
-
Method Details
-
getNameCode
public int getNameCode()Get the name code, which enables the name to be located in the name pool- Specified by:
getNameCodein interfaceNodeInfo- Overrides:
getNameCodein classNodeImpl- See Also:
-
isSameNodeInfo
Determine whether this is the same node as another node- Specified by:
isSameNodeInfoin interfaceNodeInfo- Overrides:
isSameNodeInfoin classNodeImpl- Returns:
- true if this Node object and the supplied Node object represent the same node in the tree.
-
getSequenceNumber
protected long getSequenceNumber()Get the node sequence number (in document order). Sequence numbers are monotonic but not consecutive. In the current implementation, parent nodes (elements and roots) have a zero least-significant word, while namespaces, attributes, text nodes, comments, and PIs have the top word the same as their owner and the bottom half reflecting their relative position.- Overrides:
getSequenceNumberin classNodeImpl
-
getNodeType
public final short getNodeType()Return the type of node.- Specified by:
getNodeTypein interfaceNode- Specified by:
getNodeTypein interfaceNodeInfo- Returns:
- Node.ATTRIBUTE
-
getStringValue
Return the character value of the node.- Specified by:
getStringValuein interfaceNodeInfo- Returns:
- the attribute value
-
getNextSibling
Get next sibling - not defined for attributes- Specified by:
getNextSiblingin interfaceNode- Overrides:
getNextSiblingin classNodeImpl- Returns:
- The next sibling node of the required type. Returns null if the current node is the last child of its parent.
-
getPreviousSibling
Get previous sibling - not defined for attributes- Specified by:
getPreviousSiblingin interfaceNode- Overrides:
getPreviousSiblingin classNodeImpl- Returns:
- The previous sibling node. Returns null if the current node is the first child of its parent.
-
getPreviousInDocument
Get the previous node in document order (skipping attributes)- Overrides:
getPreviousInDocumentin classNodeImpl- Returns:
- the previous node in the document, or null if there is no such node
-
getNextInDocument
Get the next node in document order (skipping attributes)- Overrides:
getNextInDocumentin classNodeImpl- Parameters:
anchor- : the scan stops when it reaches a node that is not a descendant of the specified anchor node- Returns:
- the next node in the document, or null if there is no such node
-
generateId
Get sequential key. Returns key of owning element with the attribute name as a suffix- Specified by:
generateIdin interfaceNodeInfo- Overrides:
generateIdin classNodeImpl- Returns:
- a string.
-
copy
Copy this node to a given outputter- Specified by:
copyin interfaceNodeInfo- Throws:
TransformerException
-