net.sf.saxon.tree
public class ElementImpl extends ParentNodeImpl
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 |
Constructor Summary | |
---|---|
ElementImpl()
Construct an empty ElementImpl |
Method Summary | |
---|---|
void | copy(Receiver out, int whichNamespaces, boolean copyAnnotations, int locationId)
Copy this node to a given outputter (supporting xsl:copy-of) |
void | generateId(FastStringBuffer buffer)
Get a character string that uniquely identifies this node |
AttributeCollection | getAttributeList()
Get the attribute list for this element. |
String | getBaseURI()
Get the base URI of this element node. |
int[] | getDeclaredNamespaces(int[] buffer)
Get all namespace undeclarations and undeclarations defined on this element.
|
DocumentInfo | getDocumentRoot()
Get the root document node |
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. |
NodeInfo | getRoot()
Get the root node |
String | getSystemId()
Get the system ID of the entity containing this element node. |
void | initialise(int nameCode, AttributeCollectionImpl atts, NodeInfo parent, String baseURI, int lineNumber, int sequenceNumber)
Initialise a new ElementImpl with an element name |
void | sendNamespaceDeclarations(Receiver out, boolean includeAncestors)
Output all namespace nodes associated with this 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(String uri)
Set the system ID of this node. |
Parameters: out The outputter whichNamespaces indicates which namespaces should be output: all, none, or local namespaces only (those not declared on the parent element)
Parameters: buffer to contain the generated ID
Returns: The attribute list. This will not include any namespace attributes. The attribute names will be in expanded form, with prefixes replaced by URIs
Parameters: buffer If this is non-null, and the result array fits in this buffer, then the result may overwrite the contents of this array, to avoid the cost of allocating a new array on the heap.
Returns: An array of integers representing the namespace declarations and undeclarations present on
this element. For a node other than an element, return null. Otherwise, the returned array is a
sequence of namespace codes, whose meaning may be interpreted by reference to the name pool. The
top 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.
Returns: Type.ELEMENT
Parameters: nameCode Integer representing the element name, with namespaces resolved atts The attribute list: always null parent The parent node baseURI The base URI of the new element lineNumber The line number of the element in the source document sequenceNumber Integer identifying this element within the document
Parameters: out The relevant outputter