|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
A node in the XML parse tree representing an XML element, character content, or attribute. This is the top class in the interface hierarchy for nodes; see NodeImpl for the implementation hierarchy.
Field Summary | |
static int |
ALL_NAMESPACES
Copy all in-scope namespaces |
static int[] |
EMPTY_NAMESPACE_LIST
|
static int |
LOCAL_NAMESPACES
Copy namespaces declared (or undeclared) on this element, but not namespaces inherited from a parent element |
static int |
NO_NAMESPACES
Don't copy any namespace nodes. |
Method Summary | |
int |
compareOrder(NodeInfo other)
Determine the relative position of this node and another node, in document order. |
void |
copy(Receiver out,
int whichNamespaces,
boolean copyAnnotations,
int locationId)
Copy this node to a given outputter |
java.lang.String |
generateId()
Get a character string that uniquely identifies this node. |
java.lang.String |
getAttributeValue(int fingerprint)
Get the value of a given attribute of this node |
java.lang.String |
getBaseURI()
Get the Base URI for the node, that is, the URI used for resolving a relative URI contained in the node. |
Configuration |
getConfiguration()
Get the configuration |
int[] |
getDeclaredNamespaces(int[] buffer)
Get all namespace undeclarations and undeclarations defined on this element. |
java.lang.String |
getDisplayName()
Get the display name of this node. |
int |
getDocumentNumber()
Get the document number of the document containing this node. |
DocumentInfo |
getDocumentRoot()
Get the root node, if it is a document node. |
int |
getFingerprint()
Get fingerprint. |
int |
getLineNumber()
Get line number |
java.lang.String |
getLocalPart()
Get the local part of the name of this node. |
int |
getNameCode()
Get name code. |
NamePool |
getNamePool()
Get the NamePool that holds the namecode for this node |
int |
getNodeKind()
Get the kind of node. |
NodeInfo |
getParent()
Get the NodeInfo object representing the parent of this node |
java.lang.String |
getPrefix()
Get the prefix of the name of the node. |
NodeInfo |
getRoot()
Get the root node of the tree containing this node |
java.lang.String |
getStringValue()
Return the string value of the node. |
java.lang.String |
getSystemId()
Get the System ID for the node. |
int |
getTypeAnnotation()
Get the type annotation of this node, if any. |
java.lang.String |
getURI()
Get the URI part of the name of this node. |
boolean |
hasChildNodes()
Determine whether the node has any children. |
boolean |
isSameNodeInfo(NodeInfo other)
Determine whether this is the same node as another node. |
AxisIterator |
iterateAxis(byte axisNumber)
Return an iteration over all the nodes reached by the given axis from this node |
AxisIterator |
iterateAxis(byte axisNumber,
NodeTest nodeTest)
Return an iteration over all the nodes reached by the given axis from this node that match a given NodeTest |
void |
sendNamespaceDeclarations(Receiver out,
boolean includeAncestors)
Output all namespace declarations associated with this element. |
Methods inherited from interface javax.xml.transform.Source |
setSystemId |
Methods inherited from interface net.sf.saxon.om.Item |
getStringValueCS, getTypedValue |
Field Detail |
public static final int[] EMPTY_NAMESPACE_LIST
public static final int NO_NAMESPACES
public static final int LOCAL_NAMESPACES
public static final int ALL_NAMESPACES
Method Detail |
public int getNodeKind()
Type
public boolean isSameNodeInfo(NodeInfo other)
other
- the node to be compared with this node
public java.lang.String getSystemId()
getSystemId
in interface javax.xml.transform.Source
public java.lang.String getBaseURI()
public int getLineNumber()
public int compareOrder(NodeInfo other)
other
- The other node, whose position is to be compared with this
node
public java.lang.String getStringValue()
getStringValue
in interface Item
public int getNameCode()
allocate
,
getFingerprint
public int getFingerprint()
public java.lang.String getLocalPart()
public java.lang.String getURI()
public java.lang.String getDisplayName()
public java.lang.String getPrefix()
public Configuration getConfiguration()
public NamePool getNamePool()
public int getTypeAnnotation()
Type
public NodeInfo getParent()
public AxisIterator iterateAxis(byte axisNumber)
axisNumber
- an integer identifying the axis; one of the constants
defined in class net.sf.saxon.om.Axis
java.lang.UnsupportedOperationException
- if the namespace axis is
requested and this axis is not supported for this implementation.Axis
public AxisIterator iterateAxis(byte axisNumber, NodeTest nodeTest)
axisNumber
- an integer identifying the axis; one of the constants
defined in class net.sf.saxon.om.AxisnodeTest
- A pattern to be matched by the returned nodes; nodes
that do not match this pattern are not included in the result
java.lang.UnsupportedOperationException
- if the namespace axis is
requested and this axis is not supported for this implementation.Axis
public java.lang.String getAttributeValue(int fingerprint)
fingerprint
- The fingerprint of the attribute name
public NodeInfo getRoot()
public DocumentInfo getDocumentRoot()
public boolean hasChildNodes()
public java.lang.String generateId()
public int getDocumentNumber()
public void copy(Receiver out, int whichNamespaces, boolean copyAnnotations, int locationId) throws XPathException
out
- the Receiver to which the node should be copiedwhichNamespaces
- in the case of an element, controls
which namespace nodes should be copied. Values are NO_NAMESPACES
,
LOCAL_NAMESPACES
, ALL_NAMESPACES
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
public void sendNamespaceDeclarations(Receiver out, boolean includeAncestors) throws XPathException
out
- The relevant ReceiverincludeAncestors
- True if namespaces declared on ancestor
elements must be output; false if it is known that these are
XPathException
public int[] getDeclaredNamespaces(int[] buffer)
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.
For a node other than an element, the method returns null.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |