com.icl.saxon.tinytree
Class TinyAttributeImpl

java.lang.Object
  |
  +--com.icl.saxon.om.AbstractNode
        |
        +--com.icl.saxon.tinytree.TinyNodeImpl
              |
              +--com.icl.saxon.tinytree.TinyAttributeImpl
All Implemented Interfaces:
org.w3c.dom.Attr, javax.xml.transform.dom.DOMLocator, org.w3c.dom.Node, NodeInfo, javax.xml.transform.Source, javax.xml.transform.SourceLocator

final class TinyAttributeImpl
extends TinyNodeImpl
implements org.w3c.dom.Attr

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.

Author:
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_TYPE_NODE, ELEMENT_NODE, ENTITY_NODE, ENTITY_REFERENCE_NODE, NOTATION_NODE, PROCESSING_INSTRUCTION_NODE, TEXT_NODE
 
Fields inherited from interface com.icl.saxon.om.NodeInfo
ATTRIBUTE, COMMENT, ELEMENT, NAMESPACE, NODE, NONE, NUMBER_OF_TYPES, PI, ROOT, TEXT
 
Constructor Summary
TinyAttributeImpl(TinyDocumentImpl doc, int nodeNr)
           
 
Method Summary
 void copy(Outputter out)
          Copy this node to a given outputter
 java.lang.String generateId()
          Generate id.
 java.lang.String getDisplayName()
          Get the display name of this node.
 int getFingerprint()
          Get the fingerprint of the node, used for matching names
 int getLineNumber()
          Get the line number of the node within its source document entity
 java.lang.String getLocalName()
          Get the local name of this node.
 int getNameCode()
          Get the name code of the node, used for finding names in the name pool
 short getNodeType()
          Return the type of node.
 NodeInfo getParent()
          Get the parent node
 java.lang.String getPrefix()
          Get the prefix part of the name of this node.
protected  long getSequenceNumber()
          Get the node sequence number (in document order).
 java.lang.String getStringValue()
          Return the character value of the node.
 java.lang.String getURI()
          Get the URI part of the name of this node.
 
Methods inherited from class com.icl.saxon.tinytree.TinyNodeImpl
compareOrder, getAttributeValue, getAttributeValue, getBaseURI, getDocumentRoot, getEnumeration, getOriginatingNode, getSystemId, hasAttributes, hasChildNodes, isSameNode, outputNamespaceNodes, setLineNumber, setParentNode, setSystemId
 
Methods inherited from class com.icl.saxon.om.AbstractNode
appendChild, appendData, cloneNode, 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, getFirstChild, getImplementation, getLastChild, getLength, getName, getNamespaceURI, getNextSibling, getNodeName, getNodeValue, getOwnerDocument, getOwnerElement, getParentNode, getPreviousSibling, getPublicId, getSpecified, getTagName, getValue, hasAttribute, hasAttributeNS, importNode, insertBefore, insertData, isSupported, normalize, removeAttribute, removeAttributeNode, removeAttributeNS, removeChild, replaceChild, replaceData, setAttributeNode, setAttributeNodeNS, setAttributeNS, setData, setNodeValue, setPrefix, setValue, splitText, substringData, supports
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.w3c.dom.Attr
getName, getOwnerElement, getSpecified, getValue, setValue
 
Methods inherited from interface org.w3c.dom.Node
appendChild, cloneNode, getAttributes, getChildNodes, getFirstChild, getLastChild, getNamespaceURI, getNextSibling, getNodeName, getNodeValue, getOwnerDocument, getParentNode, getPreviousSibling, hasAttributes, hasChildNodes, insertBefore, isSupported, normalize, removeChild, replaceChild, setNodeValue, setPrefix
 

Constructor Detail

TinyAttributeImpl

public TinyAttributeImpl(TinyDocumentImpl doc,
                         int nodeNr)
Method Detail

getParent

public NodeInfo getParent()
Get the parent node
Overrides:
getParent in class TinyNodeImpl
Following copied from class: com.icl.saxon.tinytree.TinyNodeImpl
Returns:
The Node object describing the containing element or root node.

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 class TinyNodeImpl

getNodeType

public final short getNodeType()
Return the type of node.
Specified by:
getNodeType in interface org.w3c.dom.Node
Returns:
Node.ATTRIBUTE

getStringValue

public java.lang.String getStringValue()
Return the character value of the node.
Returns:
the attribute value

getFingerprint

public int getFingerprint()
Get the fingerprint of the node, used for matching names
Overrides:
getFingerprint in class TinyNodeImpl

getNameCode

public int getNameCode()
Get the name code of the node, used for finding names in the name pool
Overrides:
getNameCode in class TinyNodeImpl
Following copied from interface: com.icl.saxon.om.NodeInfo
See Also:
allocate, getFingerprint

getPrefix

public java.lang.String getPrefix()
Get the prefix part of the name of this node. This is the name before the ":" if any.
Specified by:
getPrefix in interface org.w3c.dom.Node
Overrides:
getPrefix in class TinyNodeImpl
Returns:
the prefix part of the name. For an unnamed node, return null.

getDisplayName

public java.lang.String getDisplayName()
Get the display name of this node. For elements and attributes this is [prefix:]localname. For unnamed nodes, it is an empty string.
Overrides:
getDisplayName in class TinyNodeImpl
Returns:
The display name of this node. For a node with no name, return an empty string.

getLocalName

public java.lang.String getLocalName()
Get the local name of this node.
Specified by:
getLocalName in interface org.w3c.dom.Node
Overrides:
getLocalName in class TinyNodeImpl
Returns:
The local name of this node. For a node with no name, return an empty string.

getURI

public final java.lang.String getURI()
Get the URI part of the name of this node.
Overrides:
getURI in class TinyNodeImpl
Returns:
The URI of the namespace of this node. For the default namespace, return an empty string

generateId

public java.lang.String generateId()
Generate id. Returns key of owning element with the attribute name as a suffix
Overrides:
generateId in class TinyNodeImpl
Following copied from class: com.icl.saxon.tinytree.TinyNodeImpl
Returns:
a string.

copy

public void copy(Outputter out)
          throws javax.xml.transform.TransformerException
Copy this node to a given outputter

getLineNumber

public int getLineNumber()
Get the line number of the node within its source document entity
Overrides:
getLineNumber in class TinyNodeImpl
Following copied from interface: com.icl.saxon.om.NodeInfo
Returns:
the line number of the node in its original source document; or -1 if not available