net.sf.saxon.tree
Class ElementImpl
- FingerprintedNode, Item, NodeInfo, Source, PullEvent, SourceLocator, ValueRepresentation
public class ElementImpl
extends net.sf.saxon.tree.ParentNodeImpl
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.
addChild , compact , enumerateChildren , getFirstChild , getLastChild , getNthChild , getSequenceNumber , getStringValue , getStringValueCS , hasChildNodes , useChildrenArray |
atomize , compareOrder , equals , generateId , getAttributeValue , getBaseURI , getColumnNumber , getConfiguration , getDeclaredNamespaces , getDisplayName , getDocumentNumber , getDocumentRoot , getFingerprint , getFirstChild , getLastChild , getLineNumber , getLocalPart , getNameCode , getNamePool , getNextInDocument , getNextSibling , getParent , getPrefix , getPreviousInDocument , getPreviousSibling , getPublicId , getRoot , getSequenceNumber , getStringValueCS , getSystemId , getTypeAnnotation , getTypedValue , getURI , hasChildNodes , hashCode , isSameNodeInfo , iterateAxis , iterateAxis , setSystemId |
nameCode
protected int nameCode
ElementImpl
public ElementImpl()
Construct an empty ElementImpl
copy
public void copy(Receiver out,
int whichNamespaces,
boolean copyAnnotations,
int locationId)
throws XPathException
Copy this node to a given outputter (supporting xsl:copy-of)
- copy in interface NodeInfo
out
- The outputterwhichNamespaces
- indicates which namespaces should be output: all, none, or local
namespaces only (those not declared on the parent element)
getAttributeList
public AttributeCollection getAttributeList()
Get the attribute list for this element.
- The attribute list. This will not include any
namespace attributes. The attribute names will be in expanded form, with prefixes
replaced by URIs
getBaseURI
public String getBaseURI()
Get the base URI of this element node. This will be the same as the System ID unless
xml:base has been used.
- getBaseURI in interface NodeInfo
- getBaseURI in interface NodeImpl
getDeclaredNamespaces
public int[] getDeclaredNamespaces(int[] buffer)
Get all namespace undeclarations and undeclarations defined on this element.
- getDeclaredNamespaces in interface NodeInfo
- getDeclaredNamespaces in interface NodeImpl
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.
- 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.
getNodeKind
public final int getNodeKind()
Return the type of node.
- getNodeKind in interface NodeInfo
initialise
public void initialise(int nameCode,
AttributeCollectionImpl atts,
NodeInfo parent,
String baseURI,
int lineNumber,
int sequenceNumber)
Initialise a new ElementImpl with an element name
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 document
setLineNumber
public void setLineNumber(int line)
Set the line number of the element within its source document entity
setNameCode
public void setNameCode(int nameCode)
Set the name code. Used when creating a dummy element in the Stripper
nameCode
- the integer name code representing the element name
setSystemId
public void setSystemId(String uri)
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
- setSystemId in interface NodeImpl