|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectnet.sf.saxon.tree.NodeImpl
net.sf.saxon.tree.ParentNodeImpl
net.sf.saxon.tree.ElementImpl
public class 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
|
| Fields inherited from class net.sf.saxon.tree.ParentNodeImpl |
|---|
sequence |
| Fields inherited from class net.sf.saxon.tree.NodeImpl |
|---|
index, NODE_LETTER, parent |
| Fields inherited from interface net.sf.saxon.om.NodeInfo |
|---|
ALL_NAMESPACES, EMPTY_NAMESPACE_LIST, IS_DTD_TYPE, LOCAL_NAMESPACES, NO_NAMESPACES |
| Fields inherited from interface net.sf.saxon.om.ValueRepresentation |
|---|
EMPTY_VALUE_ARRAY |
| 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. |
| Methods inherited from class net.sf.saxon.tree.ParentNodeImpl |
|---|
addChild, compact, enumerateChildren, getFirstChild, getLastChild, getNthChild, getSequenceNumber, getStringValue, getStringValueCS, hasChildNodes, useChildrenArray |
| Methods inherited from class net.sf.saxon.tree.NodeImpl |
|---|
atomize, compareOrder, equals, getAttributeValue, getColumnNumber, getConfiguration, getDisplayName, getDocumentNumber, getFingerprint, getLocalPart, getNamePool, getNextInDocument, getNextSibling, getParent, getPrefix, getPreviousInDocument, getPreviousSibling, getPublicId, getTypeAnnotation, getTypedValue, getURI, hashCode, isSameNodeInfo, iterateAxis, iterateAxis |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected int nameCode
protected DocumentImpl root
| Constructor Detail |
|---|
public ElementImpl()
| Method Detail |
|---|
public void setNameCode(int nameCode)
public void initialise(int nameCode,
AttributeCollectionImpl atts,
NodeInfo parent,
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(String uri)
setSystemId in interface SourcesetSystemId in class NodeImplpublic NodeInfo getRoot()
getRoot in interface NodeInfogetRoot in class NodeImplpublic DocumentInfo getDocumentRoot()
getDocumentRoot in interface NodeInfogetDocumentRoot in class NodeImplpublic final String getSystemId()
getSystemId in interface SourcegetSystemId in interface SourceLocatorgetSystemId in interface NodeInfogetSystemId in class NodeImplpublic String getBaseURI()
getBaseURI in interface NodeInfogetBaseURI in class NodeImplpublic void setLineNumber(int line)
public int getLineNumber()
getLineNumber in interface SourceLocatorgetLineNumber in interface NodeInfogetLineNumber in class NodeImplpublic int getNameCode()
getNameCode in interface NodeInfogetNameCode in class NodeImplallocate,
getFingerprintpublic void generateId(FastStringBuffer buffer)
generateId in interface NodeInfogenerateId in class NodeImplbuffer - to contain the generated ID
public void sendNamespaceDeclarations(Receiver out,
boolean includeAncestors)
throws XPathException
sendNamespaceDeclarations in interface NodeInfosendNamespaceDeclarations in class NodeImplout - The relevant outputterincludeAncestors - True if namespaces declared on ancestor elements must
XPathExceptionpublic int[] getDeclaredNamespaces(int[] buffer)
getDeclaredNamespaces in interface NodeInfogetDeclaredNamespaces in class NodeImplbuffer - 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.
For a node other than an element, the method returns null.
public final int getNodeKind()
Typepublic AttributeCollection getAttributeList()
public void copy(Receiver out,
int whichNamespaces,
boolean copyAnnotations,
int locationId)
throws XPathException
out - The outputterwhichNamespaces - indicates which namespaces should be output: all, none, or local
namespaces only (those not declared on the parent element)copyAnnotations - indicates whether the type annotations
of element and attribute nodes should be copiedlocationId - If non-zero, identifies the location of the instruction
that requested this copy. If zero, indicates that the location information
for the original node is to be copied; in this case the Receiver must be
a LocationCopier
XPathException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||