public class SpaceStrippedNode extends AbstractVirtualNode implements WrappingFunction
docWrapper, node, parent
IS_DTD_TYPE, IS_NILLED
Modifier | Constructor and Description |
---|---|
protected |
SpaceStrippedNode() |
protected |
SpaceStrippedNode(NodeInfo node,
SpaceStrippedNode parent)
This constructor is protected: nodes should be created using the makeWrapper
factory method
|
Modifier and Type | Method and Description |
---|---|
AtomicSequence |
atomize()
Get the typed value.
|
int |
compareOrder(NodeInfo other)
Determine the relative position of this node and another node, in document order.
|
void |
copy(Receiver out,
int copyOptions,
Location locationId)
Copy this node to a given outputter (deep copy)
|
boolean |
equals(java.lang.Object other)
Determine whether this is the same node as another node.
|
NodeInfo |
getParent()
Get the NodeInfo object representing the parent of this node
|
java.lang.CharSequence |
getStringValueCS()
Get the value of the item as a CharSequence.
|
static boolean |
isPreservedNode(NodeInfo node,
SpaceStrippedDocument docWrapper,
NodeInfo actualParent)
Ask whether a node is preserved after whitespace stripping
|
AxisIterator |
iterateAxis(byte axisNumber)
Return an iteration over the nodes reached by the given axis from this node
|
AxisIterator |
iterateAxis(byte axisNumber,
NodeTest nodeTest)
Return an iteration over the nodes reached by the given axis from this node
|
protected static SpaceStrippedNode |
makeWrapper(NodeInfo node,
SpaceStrippedDocument docWrapper,
SpaceStrippedNode parent)
Factory method to wrap a node with a wrapper that implements the Saxon
NodeInfo interface.
|
VirtualNode |
makeWrapper(NodeInfo node,
VirtualNode parent)
Factory method to wrap a node within the same document as this node with a VirtualNode
|
generateId, getAttributeValue, getBaseURI, getColumnNumber, getDeclaredNamespaces, getDisplayName, getFingerprint, getLineNumber, getLocalPart, getNodeKind, getPrefix, getRealNode, getRoot, getSchemaType, getStringValue, getSystemId, getTreeInfo, getUnderlyingNode, getURI, hasChildNodes, hasFingerprint, hashCode, isId, isIdref, isNilled, saveLocation, setSystemId
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
getConfiguration, getGenre, getPublicId, isSameNodeInfo, isStreamed, toShortString
getLength, head, itemAt, iterate, iterator, reduce, subsequence, toGroundedValue
asIterable, effectiveBooleanValue, materialize
makeRepeatable
protected SpaceStrippedNode()
protected SpaceStrippedNode(NodeInfo node, SpaceStrippedNode parent)
node
- The node to be wrappedparent
- The StrippedNode that wraps the parent of this nodeprotected static SpaceStrippedNode makeWrapper(NodeInfo node, SpaceStrippedDocument docWrapper, SpaceStrippedNode parent)
node
- The underlying nodedocWrapper
- The wrapper for the document node (must be supplied)parent
- The wrapper for the parent of the node (null if unknown)public VirtualNode makeWrapper(NodeInfo node, VirtualNode parent)
makeWrapper
in interface WrappingFunction
node
- The underlying nodeparent
- The wrapper for the parent of the node (null if unknown)public static boolean isPreservedNode(NodeInfo node, SpaceStrippedDocument docWrapper, NodeInfo actualParent)
node
- the node in questiondocWrapper
- the root of the space-stripped virtual treeactualParent
- the (real) parent of the node in questionpublic AtomicSequence atomize() throws XPathException
atomize
in interface Item<NodeInfo>
atomize
in interface NodeInfo
atomize
in class AbstractVirtualNode
XPathException
- if the node has no typed value, for example if
it is an element node with element-only contentpublic boolean equals(java.lang.Object other)
Note: a.isSameNode(b) if and only if generateId(a)==generateId(b)
equals
in interface NodeInfo
equals
in class AbstractVirtualNode
other
- the node to be compared with this nodepublic int compareOrder(NodeInfo other)
compareOrder
in interface NodeInfo
compareOrder
in class AbstractVirtualNode
other
- The other node, whose position is to be compared with this nodepublic java.lang.CharSequence getStringValueCS()
getStringValueCS
in interface GroundedValue<NodeInfo>
getStringValueCS
in interface Item<NodeInfo>
getStringValueCS
in class AbstractVirtualNode
Item.getStringValue()
public NodeInfo getParent()
public AxisIterator iterateAxis(byte axisNumber, NodeTest nodeTest)
AbstractVirtualNode
iterateAxis
in interface NodeInfo
iterateAxis
in class AbstractVirtualNode
axisNumber
- the axis to be usednodeTest
- A pattern to be matched by the returned nodesAxisInfo
public AxisIterator iterateAxis(byte axisNumber)
iterateAxis
in interface NodeInfo
axisNumber
- the axis to be usedAxisInfo
public void copy(Receiver out, int copyOptions, Location locationId) throws XPathException
copy
in interface NodeInfo
out
- the Receiver to which the node should be copied. It is the caller's
responsibility to ensure that this Receiver is open before the method is called
(or that it is self-opening), and that it is closed after use.copyOptions
- a selection of the options defined in CopyOptions
locationId
- If non-null, identifies the location of the instruction
that requested this copy. If zero, indicates that the location information
is not availableXPathException
- if any downstream error occursCopyright (c) 2004-2020 Saxonica Limited. All rights reserved.