public class SnapshotNode extends VirtualCopy implements NodeInfo
VirtualCopy.VirtualCopier
Modifier and Type | Field and Description |
---|---|
protected NodeInfo |
pivot |
original, parent, root, systemId, tree
ALL_NAMESPACES, IS_DTD_TYPE, IS_NILLED, LOCAL_NAMESPACES, NO_NAMESPACES
Modifier | Constructor and Description |
---|---|
protected |
SnapshotNode(NodeInfo base,
NodeInfo pivot)
Protected constructor: create a virtual copy of a node
|
Modifier and Type | Method and Description |
---|---|
AtomicSequence |
atomize()
Get the typed value of this node
|
void |
copy(Receiver out,
int copyOptions,
Location locationId)
Copy this node to a given outputter
|
NodeInfo |
getParent()
Get the NodeInfo object representing the parent of this node
|
java.lang.String |
getPublicId()
Return the public identifier for the current document event.
|
NodeInfo |
getRoot()
Get the root node of the tree containing this node
|
java.lang.CharSequence |
getStringValueCS()
Get the value of the item as a CharSequence.
|
boolean |
isId()
Determine whether this node has the is-id property
|
boolean |
isIdref()
Determine whether this node has the is-idref property
|
protected boolean |
isIncludedInCopy(NodeInfo sourceNode)
Ask whether a node in the source tree is within the scope of this virtual copy
|
boolean |
isNilled()
Determine whether the node has the is-nilled property
|
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
|
static SnapshotNode |
makeSnapshot(NodeInfo original)
Public factory method: apply the snapshot function to a node
|
protected SnapshotNode |
wrap(NodeInfo node)
Wrap a node in a VirtualCopy.
|
compareOrder, comparePosition, equals, generateId, getAttributeValue, getBaseURI, getColumnNumber, getConfiguration, getDeclaredNamespaces, getDisplayName, getFingerprint, getLineNumber, getLocalPart, getNodeKind, getOriginalNode, getPrefix, getSchemaType, getStringValue, getSystemId, getTreeInfo, getURI, hasChildNodes, hasFingerprint, hashCode, head, isSameNodeInfo, isStreamed, iterate, iterateAxis, makeCopier, makeVirtualCopy, saveLocation, setDropNamespaces, setSystemId
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
compareOrder, comparePosition, equals, generateId, getAttributeValue, getBaseURI, getColumnNumber, getConfiguration, getDeclaredNamespaces, getDisplayName, getFingerprint, getLineNumber, getLocalPart, getNodeKind, getPrefix, getSchemaType, getStringValue, getSystemId, getTreeInfo, getURI, hasChildNodes, hasFingerprint, hashCode, isSameNodeInfo, isStreamed, iterateAxis
saveLocation
protected NodeInfo pivot
protected SnapshotNode(NodeInfo base, NodeInfo pivot)
base
- the node in the source tree to which the new node should correspondpivot
- the pivot node is the node supplied as argument to the snapshot() function; the snapshot
includes all ancestors of this node, and all descendants of this node (plus their attributes
and namespaces)public static SnapshotNode makeSnapshot(NodeInfo original)
original
- the node to be copiedprotected SnapshotNode wrap(NodeInfo node)
wrap
in class VirtualCopy
node
- the node to be wrappedpublic java.lang.CharSequence getStringValueCS()
getStringValueCS
in interface Item
getStringValueCS
in class VirtualCopy
Item.getStringValue()
public NodeInfo getParent()
getParent
in interface NodeInfo
getParent
in class VirtualCopy
public NodeInfo getRoot()
getRoot
in interface NodeInfo
getRoot
in class VirtualCopy
public void copy(Receiver out, int copyOptions, Location locationId) throws XPathException
copy
in interface NodeInfo
copy
in class VirtualCopy
out
- the Receiver to which the node should be copiedcopyOptions
- a selection of the options defined in CopyOptions
locationId
- Identifies the location of the instructionXPathException
- if any downstream error occurspublic AtomicSequence atomize() throws XPathException
atomize
in interface Item
atomize
in interface NodeInfo
atomize
in class VirtualCopy
XPathException
- if the node has no typed value, for example if
it is an element node with element-only contentpublic boolean isId()
isId
in interface NodeInfo
isId
in class VirtualCopy
public boolean isIdref()
isIdref
in interface NodeInfo
isIdref
in class VirtualCopy
public boolean isNilled()
isNilled
in interface NodeInfo
isNilled
in class VirtualCopy
public java.lang.String getPublicId()
The return value is the public identifier of the document entity or of the external parsed entity in which the markup that triggered the event appears.
getPublicId
in interface javax.xml.transform.SourceLocator
getPublicId
in interface Location
getPublicId
in interface NodeInfo
getPublicId
in interface org.xml.sax.Locator
getPublicId
in class VirtualCopy
VirtualCopy.getSystemId()
public AxisIterator iterateAxis(byte axisNumber, NodeTest nodeTest)
iterateAxis
in interface NodeInfo
iterateAxis
in class VirtualCopy
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 resultjava.lang.UnsupportedOperationException
- if the namespace axis is
requested and this axis is not supported for this implementation.AxisInfo
protected boolean isIncludedInCopy(NodeInfo sourceNode)
VirtualCopy
isIncludedInCopy
in class VirtualCopy
sourceNode
- the node being testedCopyright (c) 2004-2018 Saxonica Limited. All rights reserved.