Package com.icl.saxon.tinytree
Class TinyNamespaceImpl
java.lang.Object
com.icl.saxon.om.AbstractNode
com.icl.saxon.tinytree.TinyNodeImpl
com.icl.saxon.tinytree.TinyNamespaceImpl
- All Implemented Interfaces:
NodeInfo
,DOMLocator
,Source
,SourceLocator
,Node
A node in the XML parse tree representing a Namespace. Note that this is
generated only "on demand", when the namespace axis is expanded.
- Version:
- 28 September 2000
- Author:
- Michael H. Kay
-
Field Summary
Fields inherited from class com.icl.saxon.tinytree.TinyNodeImpl
document, nodeNr, parent
Fields inherited from class com.icl.saxon.om.AbstractNode
NODE_LETTER
Fields inherited from interface org.w3c.dom.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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
Copy this node to a given outputterGet unique identifier.Get the display name of this node.int
Get the fingerprintGet the local name of this node.int
Get the nameCode, for name matchingint
Get the namespace code (a numeric representation of the prefix and URI)final short
Return the type of node.Get the parent element of this namespace nodeGet the prefix part of the name of this node.protected long
Get the node sequence number (in document order).final String
Return the string value of the node.getURI()
Get the URI part of the name of this node.final boolean
isSameNodeInfo
(NodeInfo other) Determine whether this is the same node as another node(package private) void
setParentNode
(int nodeNr) Set the parent element for this namespace nodeMethods inherited from class com.icl.saxon.tinytree.TinyNodeImpl
compareOrder, getAttributeValue, getAttributeValue, getBaseURI, getDocumentRoot, getEnumeration, getLineNumber, getOriginatingNode, getSystemId, hasAttributes, hasChildNodes, outputNamespaceNodes, setLineNumber, setParentNode, setSystemId
Methods inherited from class com.icl.saxon.om.AbstractNode
appendChild, appendData, cloneNode, compareDocumentPosition, copyStringValue, createAttribute, createAttributeNS, createCDATASection, createComment, createDocumentFragment, createElement, createElementNS, createEntityReference, createProcessingInstruction, createTextNode, deleteData, disallowUpdate, getAttribute, getAttributeNode, getAttributeNodeNS, getAttributeNS, getAttributes, getChildNodes, getColumnNumber, getData, getDoctype, getDocumentElement, getElementById, getElementsByTagName, getElementsByTagNameNS, getFeature, getFirstChild, getImplementation, getLastChild, getLength, getName, getNamespaceURI, getNextSibling, getNodeName, getNodeValue, getOwnerDocument, getOwnerElement, getParentNode, getPreviousSibling, 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, supports
-
Constructor Details
-
TinyNamespaceImpl
-
-
Method Details
-
getNamespaceCode
public int getNamespaceCode()Get the namespace code (a numeric representation of the prefix and URI) -
getFingerprint
public int getFingerprint()Get the fingerprint- Specified by:
getFingerprint
in interfaceNodeInfo
- Overrides:
getFingerprint
in classTinyNodeImpl
-
setParentNode
void setParentNode(int nodeNr) Set the parent element for this namespace node -
getNameCode
public int getNameCode()Get the nameCode, for name matching- Specified by:
getNameCode
in interfaceNodeInfo
- Overrides:
getNameCode
in classTinyNodeImpl
- See Also:
-
getPrefix
Get the prefix part of the name of this node. This is the name before the ":" if any. -
getDisplayName
Get the display name of this node. For namespaces this is the namespace prefix.- Specified by:
getDisplayName
in interfaceNodeInfo
- Overrides:
getDisplayName
in classTinyNodeImpl
- Returns:
- The display name of this node. For a node with no name, return an empty string.
-
getLocalName
Get the local name of this node. For namespaces this is the namespace prefix.- Specified by:
getLocalName
in interfaceNode
- Specified by:
getLocalName
in interfaceNodeInfo
- Overrides:
getLocalName
in classTinyNodeImpl
- Returns:
- The local name of this node.
-
getURI
Get the URI part of the name of this node.- Specified by:
getURI
in interfaceNodeInfo
- Overrides:
getURI
in classTinyNodeImpl
- Returns:
- The URI of the namespace of this node. Always null.
-
getParent
Get the parent element of this namespace node- Specified by:
getParent
in interfaceNodeInfo
- Overrides:
getParent
in classTinyNodeImpl
- Returns:
- The Node object describing the containing element or root node.
-
isSameNodeInfo
Determine whether this is the same node as another node- Specified by:
isSameNodeInfo
in interfaceNodeInfo
- Overrides:
isSameNodeInfo
in classTinyNodeImpl
- Returns:
- true if this Node object and the supplied Node object represent the same node in the tree.
-
getNodeType
public final short getNodeType()Return the type of node.- Returns:
- NodeInfo.NAMESPACE
-
getStringValue
Return the string value of the node.- Returns:
- the namespace uri
-
generateId
Get unique identifier. Returns key of owning element with the name fingerprint as a suffix- Specified by:
generateId
in interfaceNodeInfo
- Overrides:
generateId
in classTinyNodeImpl
- Returns:
- a string.
-
copy
Copy this node to a given outputter- Throws:
TransformerException
-
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:
getSequenceNumber
in classTinyNodeImpl
-