|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
|
+--com.icl.saxon.om.AbstractNode
|
+--com.icl.saxon.tinytree.TinyNodeImpl
|
+--com.icl.saxon.tinytree.TinyParentNodeImpl
|
+--com.icl.saxon.tinytree.TinyDocumentImpl
A node in the XML parse tree representing the Document itself (or equivalently, the root node of the Document).
| Field Summary | |
protected int[] |
attCode
|
protected int[] |
attParent
|
protected java.lang.String[] |
attValue
|
protected char[] |
charBuffer
|
protected int |
charBufferLength
|
protected java.lang.StringBuffer |
commentBuffer
|
protected short[] |
depth
|
protected TinyDocumentImpl |
document
|
protected int |
lastLevelOneNode
|
protected int[] |
length
|
protected int[] |
nameCode
|
protected int[] |
namespaceCode
|
protected int[] |
namespaceParent
|
protected int[] |
next
|
protected int |
nodeNr
|
protected byte[] |
nodeType
|
protected int |
numberOfAttributes
|
protected int |
numberOfNamespaces
|
protected int |
numberOfNodes
|
protected int[] |
offset
|
protected com.icl.saxon.tinytree.TinyNodeImpl |
parent
|
protected int[] |
prior
|
| Fields inherited from class com.icl.saxon.om.AbstractNode |
NODE_LETTER |
| Fields inherited from interface com.icl.saxon.om.NodeInfo |
ATTRIBUTE, COMMENT, ELEMENT, NAMESPACE, NODE, NONE, NUMBER_OF_TYPES, PI, ROOT, TEXT |
| 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 |
| Constructor Summary | |
TinyDocumentImpl()
|
|
| Method Summary | |
protected void |
addAttribute(int parent0,
int code0,
java.lang.String type0,
java.lang.String value0)
|
protected void |
addNamespace(int parent0,
int nscode0)
|
protected void |
addNode(short type0,
int depth0,
int offset0,
int length0,
int nameCode0)
|
protected void |
appendChars(char[] chars,
int start,
int length)
|
int |
compareOrder(NodeInfo other)
Determine the relative position of this node and another node, in document order. |
void |
copy(Outputter out)
Copy this node to a given outputter |
void |
copyStringValue(Outputter out)
Copy the string-value of this node to a given outputter |
void |
diagnosticDump()
Produce diagnostic print of main tree arrays |
protected void |
ensureAttributeCapacity()
|
protected void |
ensureNamespaceCapacity()
|
protected void |
ensureNodeCapacity()
|
protected void |
ensurePriorIndex()
On demand, make an index for quick access to preceding-sibling nodes |
java.lang.String |
generateId()
Get a character string that uniquely identifies this node within the document |
protected AxisEnumeration |
getAllElements(int fingerprint)
Get a list of all elements with a given name. |
protected com.icl.saxon.tinytree.TinyAttributeImpl |
getAttributeNode(int nr)
Make a (transient) attribute node from the array of attributes |
java.lang.String |
getAttributeValue(int fingerprint)
Get the value of a given attribute of this node |
java.lang.String |
getAttributeValue(java.lang.String uri,
java.lang.String localName)
Find the value of a given attribute of this node. |
java.lang.String |
getBaseURI()
Get the base URI of this root node. |
java.lang.String |
getDisplayName()
Get the display name of this node. |
DocumentInfo |
getDocumentRoot()
Get the root (document) node |
AxisEnumeration |
getEnumeration(byte axisNumber,
NodeTest nodeTest)
Return an enumeration over the nodes reached by the given axis from this node |
int |
getFingerprint()
Get the fingerprint of the node, used for matching names |
java.util.Hashtable |
getKeyIndex(KeyManager keymanager,
int fingerprint)
Get the index for a given key |
int |
getLineNumber()
Get the line number of this root node. |
protected int |
getLineNumber(int sequence)
Get the line number for an element. |
java.lang.String |
getLocalName()
Get the local name of this node. |
int |
getNameCode()
Get the name code of the node, used for matching names |
NamePool |
getNamePool()
Get the name pool used for the names in this document |
protected com.icl.saxon.tinytree.TinyNamespaceImpl |
getNamespaceNode(int nr)
Make a (transient) namespace node from the array of namespace declarations |
com.icl.saxon.tinytree.TinyNodeImpl |
getNode(int nr)
|
short |
getNodeType()
Return the type of node. |
org.w3c.dom.Node |
getOriginatingNode()
Get the node corresponding to this javax.xml.transform.dom.DOMLocator |
NodeInfo |
getParent()
Find the parent node of this node. |
java.lang.String |
getPrefix()
Get the prefix part of the name of this node. |
long |
getSequenceNumber()
Get the node sequence number (in document order). |
java.lang.String |
getStringValue()
Return the string-value of the node, that is, the concatenation of the character content of all descendent elements and text nodes. |
java.lang.String |
getSystemId()
Get the system id of this root node |
protected java.lang.String |
getSystemId(int seq)
Get the system id of an element in the document |
java.lang.String |
getUnparsedEntity(java.lang.String name)
Get the unparsed entity with a given name |
java.lang.String |
getURI()
Get the URI part of the name of this node. |
boolean |
hasAttributes()
Returns whether this node has any attributes. |
boolean |
hasChildNodes()
Determine if the node has children. |
boolean |
isSameNode(NodeInfo other)
Determine whether this is the same node as another node |
protected boolean |
isUsingNamespaces()
determine whether this document uses namespaces |
void |
outputNamespaceNodes(Outputter out,
boolean includeAncestors)
Output all namespace nodes associated with this element. |
NodeInfo |
selectID(java.lang.String id)
Get the element with a given ID. |
void |
setKeyIndex(KeyManager keymanager,
int fingerprint,
java.util.Hashtable keyindex)
Set the index for a given key. |
void |
setLineNumber(int line)
Set the line number of the node within its source document entity |
protected void |
setLineNumber(int sequence,
int line)
Set the line number for an element. |
void |
setLineNumbering()
Set line numbering on |
void |
setNamePool(NamePool pool)
Set the name pool used for all names in this document |
protected void |
setParentNode(com.icl.saxon.tinytree.TinyNodeImpl parent)
Set the parent of this node. |
protected void |
setSystemId(int seq,
java.lang.String uri)
Set the system id of an element in the document |
void |
setSystemId(java.lang.String uri)
Set the system id of this node |
protected void |
setUnparsedEntity(java.lang.String name,
java.lang.String uri)
Set an unparsed entity URI associated with this document. |
protected void |
truncate(int nodes)
Truncate the tree: used in preview mode to delete an element after it has been processed |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface com.icl.saxon.om.NodeInfo |
compareOrder, copyStringValue, getAttributeValue, getAttributeValue, getDisplayName, getEnumeration, getFingerprint, getLocalName, getNameCode, getPrefix, getStringValue, getURI, hasChildNodes, isSameNode, outputNamespaceNodes |
| Methods inherited from interface org.w3c.dom.Document |
createAttribute, createAttributeNS, createCDATASection, createComment, createDocumentFragment, createElement, createElementNS, createEntityReference, createProcessingInstruction, createTextNode, getDoctype, getDocumentElement, getElementById, getElementsByTagName, getElementsByTagNameNS, getImplementation, importNode |
| Methods inherited from interface org.w3c.dom.Node |
appendChild, cloneNode, getAttributes, getChildNodes, getFirstChild, getLastChild, getLocalName, getNamespaceURI, getNextSibling, getNodeName, getNodeValue, getOwnerDocument, getParentNode, getPrefix, getPreviousSibling, hasAttributes, hasChildNodes, insertBefore, isSupported, normalize, removeChild, replaceChild, setNodeValue, setPrefix |
| Field Detail |
protected char[] charBuffer
protected int charBufferLength
protected java.lang.StringBuffer commentBuffer
protected int numberOfNodes
protected int lastLevelOneNode
protected byte[] nodeType
protected short[] depth
protected int[] next
protected int[] offset
protected int[] length
protected int[] nameCode
protected int[] prior
protected int numberOfAttributes
protected int[] attParent
protected int[] attCode
protected java.lang.String[] attValue
protected int numberOfNamespaces
protected int[] namespaceParent
protected int[] namespaceCode
protected TinyDocumentImpl document
protected int nodeNr
protected com.icl.saxon.tinytree.TinyNodeImpl parent
| Constructor Detail |
public TinyDocumentImpl()
| Method Detail |
public void setNamePool(NamePool pool)
setNamePool in interface DocumentInfopublic NamePool getNamePool()
getNamePool in interface DocumentInfoprotected void ensureNodeCapacity()
protected void ensureAttributeCapacity()
protected void ensureNamespaceCapacity()
protected void addNode(short type0,
int depth0,
int offset0,
int length0,
int nameCode0)
protected void appendChars(char[] chars,
int start,
int length)
protected void truncate(int nodes)
protected void ensurePriorIndex()
protected void addAttribute(int parent0,
int code0,
java.lang.String type0,
java.lang.String value0)
protected void addNamespace(int parent0,
int nscode0)
public com.icl.saxon.tinytree.TinyNodeImpl getNode(int nr)
public long getSequenceNumber()
getSequenceNumber in class com.icl.saxon.tinytree.TinyNodeImplprotected com.icl.saxon.tinytree.TinyAttributeImpl getAttributeNode(int nr)
protected boolean isUsingNamespaces()
protected com.icl.saxon.tinytree.TinyNamespaceImpl getNamespaceNode(int nr)
public void setSystemId(java.lang.String uri)
setSystemId in interface javax.xml.transform.SourcesetSystemId in class com.icl.saxon.tinytree.TinyNodeImplpublic java.lang.String getSystemId()
getSystemId in interface NodeInfogetSystemId in class com.icl.saxon.tinytree.TinyNodeImplcom.icl.saxon.om.NodeInfopublic java.lang.String getBaseURI()
getBaseURI in interface NodeInfogetBaseURI in class com.icl.saxon.tinytree.TinyNodeImpl
protected void setSystemId(int seq,
java.lang.String uri)
protected java.lang.String getSystemId(int seq)
public void setLineNumbering()
protected void setLineNumber(int sequence,
int line)
protected int getLineNumber(int sequence)
public int getLineNumber()
getLineNumber in interface NodeInfogetLineNumber in class com.icl.saxon.tinytree.TinyNodeImplpublic final short getNodeType()
getNodeType in interface NodeInfopublic NodeInfo getParent()
getParent in interface NodeInfogetParent in class com.icl.saxon.tinytree.TinyNodeImplpublic DocumentInfo getDocumentRoot()
getDocumentRoot in interface NodeInfogetDocumentRoot in class com.icl.saxon.tinytree.TinyNodeImplpublic java.lang.String generateId()
generateId in interface NodeInfogenerateId in class com.icl.saxon.tinytree.TinyNodeImplprotected AxisEnumeration getAllElements(int fingerprint)
public NodeInfo selectID(java.lang.String id)
selectID in interface DocumentInfoid - The unique ID of the required element, previously registered using registerID()
public java.util.Hashtable getKeyIndex(KeyManager keymanager,
int fingerprint)
getKeyIndex in interface DocumentInfokeymanager - The key manager managing this key
public void setKeyIndex(KeyManager keymanager,
int fingerprint,
java.util.Hashtable keyindex)
setKeyIndex in interface DocumentInfokeymanager - The key manager managing this keyfingerprint - The fingerprint of the name of the key (unique with the key manager)keyindex - the index, in the form of a Hashtable that
maps the key value to a set of nodes having that key value. Or the String
"under construction", indicating that the index is being built.
protected void setUnparsedEntity(java.lang.String name,
java.lang.String uri)
public java.lang.String getUnparsedEntity(java.lang.String name)
getUnparsedEntity in interface DocumentInfoname - the name of the entity
public void copy(Outputter out)
throws javax.xml.transform.TransformerException
copy in interface NodeInfopublic void diagnosticDump()
public boolean hasChildNodes()
hasChildNodes in class com.icl.saxon.tinytree.TinyNodeImplcom.icl.saxon.tinytree.TinyNodeImpltrue if this node has any attributes,
false otherwise.public java.lang.String getStringValue()
public void copyStringValue(Outputter out)
throws javax.xml.transform.TransformerException
copyStringValue in class AbstractNodeprotected void setParentNode(com.icl.saxon.tinytree.TinyNodeImpl parent)
public boolean isSameNode(NodeInfo other)
isSameNode in class AbstractNodepublic org.w3c.dom.Node getOriginatingNode()
getOriginatingNode in class AbstractNodepublic void setLineNumber(int line)
public final int compareOrder(NodeInfo other)
compareOrder in class AbstractNodeother - The other node, whose position is to be compared with this nodepublic int getFingerprint()
getFingerprint in class AbstractNodepublic int getNameCode()
getNameCode in class AbstractNodecom.icl.saxon.om.NodeInfoallocate,
getFingerprintpublic java.lang.String getPrefix()
getPrefix in class AbstractNodepublic java.lang.String getURI()
getURI in class AbstractNodepublic java.lang.String getDisplayName()
getDisplayName in class AbstractNodepublic java.lang.String getLocalName()
getLocalName in class AbstractNode
public AxisEnumeration getEnumeration(byte axisNumber,
NodeTest nodeTest)
getEnumeration in class AbstractNodeaxisNumber - Identifies the required axis, eg. Axis.CHILD or Axis.PARENTnodeTest - A pattern to be matched by the returned nodespublic boolean hasAttributes()
hasAttributes in class AbstractNodetrue if this node has any attributes,
false otherwise.
public java.lang.String getAttributeValue(java.lang.String uri,
java.lang.String localName)
getAttributeValue in class AbstractNodeuri - the namespace uri of an attributelocalName - the local name of an attributepublic java.lang.String getAttributeValue(int fingerprint)
getAttributeValue in class AbstractNodefingerprint - The fingerprint of the attribute name
public void outputNamespaceNodes(Outputter out,
boolean includeAncestors)
throws javax.xml.transform.TransformerException
outputNamespaceNodes in class AbstractNodeout - The relevant outputterincludeAncestors - True if namespaces declared on ancestor elements must
be output; false if it is known that these are already on the result tree
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||