| java.lang.Object net.sf.saxon.tree.NodeImpl net.sf.saxon.tree.ParentNodeImpl net.sf.saxon.tree.ElementImpl
All known Subclasses: net.sf.saxon.tree.ElementWithAttributes,
ElementImpl | public class ElementImpl extends ParentNodeImpl (Code) | | 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.
author: Michael H. Kay |
Method Summary | |
public void | copy(Receiver out, int whichNamespaces, boolean copyAnnotations, int locationId) | public String | generateId() | public AttributeCollection | getAttributeList() Get the attribute list for this element.
The attribute list. | public String | getBaseURI() Get the base URI of this element node. | public int[] | getDeclaredNamespaces(int[] buffer) Get all namespace undeclarations and undeclarations defined on this element.
Parameters: buffer - If this is non-null, and the result array fits in this buffer, then the resultmay overwrite the contents of this array, to avoid the cost of allocating a new array on the heap. | public DocumentInfo | getDocumentRoot() | public int | getLineNumber() | public int | getNameCode() Get the nameCode of the node. | final public int | getNodeKind() Return the type of node. | public NodeInfo | getRoot() | final public String | getSystemId() Get the system ID of the entity containing this element node. | public void | initialise(int nameCode, AttributeCollectionImpl atts, NodeInfo parent, String baseURI, int lineNumber, int sequenceNumber) | public void | sendNamespaceDeclarations(Receiver out, boolean includeAncestors) Output all namespace nodes associated with this element. | public void | setLineNumber(int line) | public void | setNameCode(int nameCode) Set the name code. | public void | setSystemId(String uri) Set the system ID of this node. |
nameCode | protected int nameCode(Code) | | |
ElementImpl | public ElementImpl()(Code) | | Construct an empty ElementImpl
|
copy | public void copy(Receiver out, int whichNamespaces, boolean copyAnnotations, int locationId) throws XPathException(Code) | | Copy this node to a given outputter (supporting xsl:copy-of)
Parameters: out - The outputter Parameters: whichNamespaces - indicates which namespaces should be output: all, none, or localnamespaces only (those not declared on the parent element) |
generateId | public String generateId()(Code) | | Get a character string that uniquely identifies this node
a string. |
getAttributeList | public AttributeCollection getAttributeList()(Code) | | Get the attribute list for this element.
The attribute list. This will not include anynamespace attributes. The attribute names will be in expanded form, with prefixesreplaced by URIs |
getBaseURI | public String getBaseURI()(Code) | | Get the base URI of this element node. This will be the same as the System ID unless
xml:base has been used.
|
getDeclaredNamespaces | public int[] getDeclaredNamespaces(int[] buffer)(Code) | | Get all namespace undeclarations and undeclarations defined on this element.
Parameters: buffer - If this is non-null, and the result array fits in this buffer, then the resultmay overwrite the contents of this array, to avoid the cost of allocating a new array on the heap. An array of integers representing the namespace declarations and undeclarations present onthis element. For a node other than an element, return null. Otherwise, the returned array is asequence of namespace codes, whose meaning may be interpreted by reference to the name pool. Thetop half word of each namespace code represents the prefix, the bottom half represents the URI.If the bottom half is zero, then this is a namespace undeclaration rather than a declaration.The XML namespace is never included in the list. If the supplied array is larger than required,then the first unused entry will be set to -1.For a node other than an element, the method returns null. |
getLineNumber | public int getLineNumber()(Code) | | Get the line number of the node within its source document entity
|
getNameCode | public int getNameCode()(Code) | | Get the nameCode of the node. This is used to locate the name in the NamePool
|
getNodeKind | final public int getNodeKind()(Code) | | Return the type of node.
Type.ELEMENT |
getSystemId | final public String getSystemId()(Code) | | Get the system ID of the entity containing this element node.
|
initialise | public void initialise(int nameCode, AttributeCollectionImpl atts, NodeInfo parent, String baseURI, int lineNumber, int sequenceNumber)(Code) | | Initialise a new ElementImpl with an element name
Parameters: nameCode - Integer representing the element name, with namespaces resolved Parameters: atts - The attribute list: always null Parameters: parent - The parent node Parameters: baseURI - The base URI of the new element Parameters: lineNumber - The line number of the element in the source document Parameters: sequenceNumber - Integer identifying this element within the document |
sendNamespaceDeclarations | public void sendNamespaceDeclarations(Receiver out, boolean includeAncestors) throws XPathException(Code) | | Output all namespace nodes associated with this element.
Parameters: out - The relevant outputter |
setLineNumber | public void setLineNumber(int line)(Code) | | Set the line number of the element within its source document entity
|
setNameCode | public void setNameCode(int nameCode)(Code) | | Set the name code. Used when creating a dummy element in the Stripper
|
setSystemId | public void setSystemId(String uri)(Code) | | Set the system ID of this node. This method is provided so that a NodeInfo
implements the javax.xml.transform.Source interface, allowing a node to be
used directly as the Source of a transformation
|
Fields inherited from net.sf.saxon.tree.ParentNodeImpl | protected int sequence(Code)(Java Doc)
|
|
|