net.sf.saxon.om
Class VirtualUntypedCopy
- Item, NodeInfo, Source, PullEvent, ValueRepresentation
public class VirtualUntypedCopy
This class represents a virtual copy of a node with type annotations stripped
atomize , compareOrder , copy , equals , generateId , getAttributeValue , getBaseURI , getConfiguration , getDeclaredNamespaces , getDisplayName , getDocumentNumber , getDocumentRoot , getFingerprint , getLineNumber , getLocalPart , getNameCode , getNamePool , getNodeKind , getParent , getPrefix , getRoot , getStringValue , getStringValueCS , getSystemId , getTypeAnnotation , getTypedValue , getURI , hasChildNodes , hashCode , isSameNodeInfo , iterateAxis , iterateAxis , makeCopier , makeVirtualCopy , setDocumentNumber , setSystemId , wrap |
VirtualUntypedCopy
protected VirtualUntypedCopy(NodeInfo base)
Protected constructor: create a virtual copy of a node
base
- the node to be copied
atomize
public Value atomize()
throws XPathException
Get the typed value. The result of this method will always be consistent with the method
Item.getTypedValue()
. However, this method is often more convenient and may be
more efficient, especially in the common case where the value is expected to be a singleton.
- atomize in interface NodeInfo
- atomize in interface VirtualCopy
- the typed value. If requireSingleton is set to true, the result will always be an
AtomicValue. In other cases it may be a Value representing a sequence whose items are atomic
values.
copy
public void copy(Receiver out,
int whichNamespaces,
boolean copyAnnotations,
int locationId)
throws XPathException
Copy this node to a given Receiver.
This method is primarily for internal use. It should not be considered a stable
part of the Saxon API.
- copy in interface NodeInfo
- copy in interface VirtualCopy
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.whichNamespaces
- in the case of an element, controls
which namespace nodes should be copied. Values are NodeInfo.NO_NAMESPACES
,
NodeInfo.LOCAL_NAMESPACES
, NodeInfo.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
makeVirtualUntypedCopy
public static VirtualCopy makeVirtualUntypedCopy(NodeInfo original,
NodeInfo root)
Public factory method: create an untyped virtual copy of a node
original
- the node to be copiedroot
- the root of the tree