|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--net.sf.saxon.om.AbstractNode
|
+--net.sf.saxon.tree.NodeImpl
|
+--net.sf.saxon.tree.ParentNodeImpl
|
+--net.sf.saxon.tree.ElementImpl
ElementImpl implements an element with no attributes or namespace declarations.
This class is an implementation of NodeInfo. For elements with attributes or namespace declarations, class ElementWithAttributes is used.
| Field Summary | |
protected int |
nameCode
|
protected DocumentImpl |
root
|
protected int |
sequence
|
| Fields inherited from class net.sf.saxon.tree.NodeImpl |
index, parent |
| Fields inherited from class net.sf.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 net.sf.saxon.om.NodeInfo |
ALL_NAMESPACES, LOCAL_NAMESPACES, NO_NAMESPACES |
| Constructor Summary | |
ElementImpl()
Construct an empty ElementImpl |
|
| Method Summary | |
void |
addChild(NodeImpl node,
int index)
Add a child node to this node. |
void |
addNamespaceNodes(ElementImpl owner,
java.util.List list,
boolean addXML)
Make the set of all namespace nodes associated with this element. |
void |
compact(int size)
Compact the space used by this node |
void |
copy(Receiver out,
int whichNamespaces)
Copy this node to a given outputter (supporting xsl:copy-of) |
AxisIterator |
enumerateChildren(NodeTest test)
Get an enumeration of the children of this node |
java.lang.String |
generateId()
Get a character string that uniquely identifies this node |
AttributeCollection |
getAttributeList()
Get the attribute list for this element. |
java.lang.String |
getBaseURI()
Get the base URI of this element node. |
DocumentInfo |
getDocumentRoot()
Get the root document node |
org.w3c.dom.Node |
getFirstChild()
Get the first child node of the element |
org.w3c.dom.Node |
getLastChild()
Get the last child node of the element |
int |
getLineNumber()
Get the line number of the node within its source document entity |
int |
getNameCode()
Get the nameCode of the node. |
int |
getNodeKind()
Return the type of node. |
java.lang.String |
getNodeValue()
Get the node value as defined in the DOM. |
protected NodeImpl |
getNthChild(int n)
Get the nth child node of the element (numbering from 0) |
NodeInfo |
getRoot()
Get the root node |
protected 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 the entity containing this element node. |
boolean |
hasChildNodes()
Determine if the node has any children. |
void |
initialise(int nameCode,
AttributeCollection atts,
NodeInfo parent,
java.lang.String baseURI,
int lineNumber,
int sequenceNumber)
Initialise a new ElementImpl with an element name |
void |
outputNamespaceNodes(Receiver out,
boolean includeAncestors)
Output all namespace nodes associated with this element. |
void |
setAttribute(java.lang.String name,
java.lang.String value)
Set the value of an attribute on the current element. |
void |
setLineNumber(int line)
Set the line number of the element within its source document entity |
void |
setNameCode(int nameCode)
Set the name code. |
void |
setSystemId(java.lang.String uri)
Set the system ID of this node. |
void |
useChildrenArray(NodeImpl[] array)
Supply an array to be used for the array of children. |
| Methods inherited from class net.sf.saxon.tree.NodeImpl |
compareOrder, copy, getAttributeValue, getDisplayName, getDocumentElement, getFingerprint, getLocalPart, getNamePool, getNextInDocument, getNextSibling, getOriginatingNode, getParent, getPrefix, getPreviousInDocument, getPreviousSibling, getURI, hasAttributes, isSameNodeInfo, iterateAxis, iterateAxis |
| 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.Element |
getAttribute, getAttributeNode, getAttributeNodeNS, getAttributeNS, getElementsByTagName, getElementsByTagNameNS, getTagName, hasAttribute, hasAttributeNS, removeAttribute, removeAttributeNode, removeAttributeNS, setAttributeNode, setAttributeNodeNS, setAttributeNS |
| Methods inherited from interface org.w3c.dom.Node |
appendChild, cloneNode, getAttributes, getChildNodes, getFirstChild, getLastChild, getLocalName, getNamespaceURI, getNextSibling, getNodeName, getNodeType, getNodeValue, getOwnerDocument, getParentNode, getPrefix, getPreviousSibling, hasAttributes, hasChildNodes, insertBefore, isSupported, normalize, removeChild, replaceChild, setNodeValue, setPrefix |
| Field Detail |
protected int nameCode
protected DocumentImpl root
protected int sequence
| Constructor Detail |
public ElementImpl()
| Method Detail |
public void setNameCode(int nameCode)
public void initialise(int nameCode,
AttributeCollection atts,
NodeInfo parent,
java.lang.String baseURI,
int lineNumber,
int sequenceNumber)
nameCode - Integer representing the element name, with namespaces resolvedatts - The attribute list: always nullparent - The parent nodebaseURI - The base URI of the new elementlineNumber - The line number of the element in the source documentsequenceNumber - Integer identifying this element within the documentpublic void setSystemId(java.lang.String uri)
setSystemId in interface javax.xml.transform.SourcesetSystemId in class NodeImplpublic NodeInfo getRoot()
getRoot in interface NodeInfogetRoot in class NodeImplpublic DocumentInfo getDocumentRoot()
getDocumentRoot in interface NodeInfogetDocumentRoot in class NodeImplpublic final java.lang.String getSystemId()
getSystemId in interface NodeInfogetSystemId in class NodeImplpublic java.lang.String getBaseURI()
getBaseURI in interface NodeInfogetBaseURI in class NodeImplpublic void setLineNumber(int line)
public int getLineNumber()
getLineNumber in interface NodeInfogetLineNumber in class NodeImplpublic int getNameCode()
getNameCode in interface NodeInfogetNameCode in class NodeImplallocate,
getFingerprintpublic java.lang.String generateId()
generateId in interface NodeInfogenerateId in class NodeImpl
public void addNamespaceNodes(ElementImpl owner,
java.util.List list,
boolean addXML)
owner - The element owning these namespace nodes.list - a List containing NamespaceImpl objects representing the namespaces
in scope for this element; the method appends nodes to this List, which should
initially be empty. Note that the returned list will never contain the XML namespace
(to get this, the NamespaceEnumeration class adds it itself). The list WILL include
an entry for the undeclaration xmlns=""; again it is the job of NamespaceEnumeration
to ignore this, since it doesn't represent a true namespace node.addXML - Add the XML namespace node to the list
public void outputNamespaceNodes(Receiver out,
boolean includeAncestors)
throws XPathException
outputNamespaceNodes in interface NodeInfooutputNamespaceNodes in class NodeImplout - 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
XPathExceptionpublic final int getNodeKind()
getNodeKind in interface NodeInfoTypepublic AttributeCollection getAttributeList()
public void setAttribute(java.lang.String name,
java.lang.String value)
throws org.w3c.dom.DOMException
setAttribute in interface org.w3c.dom.Elementorg.w3c.dom.DOMException - (always): the Saxon tree is immutable
public void copy(Receiver out,
int whichNamespaces)
throws XPathException
copy in class NodeImplout - The outputterwhichNamespaces - indicates which namespaces should be output: all, none, or local
namespaces only (those not declared on the parent element)
XPathExceptionprotected final long getSequenceNumber()
getSequenceNumber in class NodeImplpublic final boolean hasChildNodes()
hasChildNodes in interface org.w3c.dom.NodehasChildNodes in class NodeImpltrue if the node has any children,
false if the node has no children.public final AxisIterator enumerateChildren(NodeTest test)
test - A NodeTest to be satisfied by the child nodes, or null
if all child node are to be returnedpublic final org.w3c.dom.Node getFirstChild()
getFirstChild in interface org.w3c.dom.NodegetFirstChild in class NodeImplpublic final org.w3c.dom.Node getLastChild()
getLastChild in interface org.w3c.dom.NodegetLastChild in class NodeImplprotected final NodeImpl getNthChild(int n)
public java.lang.String getStringValue()
getStringValue in interface NodeInfogetStringValue in class AbstractNodepublic void useChildrenArray(NodeImpl[] array)
public void addChild(NodeImpl node,
int index)
public void compact(int size)
public java.lang.String getNodeValue()
getNodeValue in interface org.w3c.dom.NodegetNodeValue in class AbstractNode
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||