Package net.sf.saxon.tree.wrapper
Class VirtualUntypedCopy
- java.lang.Object
-
- net.sf.saxon.tree.wrapper.VirtualCopy
-
- net.sf.saxon.tree.wrapper.VirtualUntypedCopy
-
- All Implemented Interfaces:
javax.xml.transform.Source,javax.xml.transform.SourceLocator,GroundedValue,Item,NodeInfo,Sequence,Location,org.xml.sax.Locator
public class VirtualUntypedCopy extends VirtualCopy
This class represents a virtual copy of a node with type annotations stripped
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class net.sf.saxon.tree.wrapper.VirtualCopy
VirtualCopy.VirtualCopier
-
-
Field Summary
-
Fields inherited from class net.sf.saxon.tree.wrapper.VirtualCopy
original, parent, root, systemIdSupplier, tree
-
Fields inherited from interface net.sf.saxon.om.NodeInfo
IS_DTD_TYPE, IS_NILLED
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedVirtualUntypedCopy(NodeInfo base, NodeInfo root)Protected constructor: create a virtual copy of a node
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description AtomicSequenceatomize()Get the typed value.voidcopy(Receiver out, int copyOptions, Location locationId)Copy this node to a given outputterSchemaTypegetSchemaType()Get the type annotation of this node, if any.booleanisNilled()Determine whether the node has the is-nilled propertystatic VirtualCopymakeVirtualUntypedTree(NodeInfo original, NodeInfo root)Public factory method: create a new untyped virtual tree as a copy of a nodeprotected VirtualCopywrap(NodeInfo node)Method to create the virtual copy of a node encountered when navigating.-
Methods inherited from class net.sf.saxon.tree.wrapper.VirtualCopy
compareOrder, equals, generateId, getAllNamespaces, getAttributeValue, getBaseURI, getColumnNumber, getConfiguration, getDeclaredNamespaces, getDisplayName, getFingerprint, getLineNumber, getLocalPart, getNodeKind, getOriginalNode, getParent, getPrefix, getPublicId, getRoot, getStringValue, getStringValueCS, getSystemId, getTreeInfo, getURI, hasChildNodes, hasFingerprint, hashCode, isId, isIdref, isIncludedInCopy, iterateAxis, makeCopier, makeVirtualCopy, saveLocation, setDropNamespaces, setSystemId
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface net.sf.saxon.om.GroundedValue
asIterable, concatenate, containsNode, effectiveBooleanValue, materialize
-
Methods inherited from interface net.sf.saxon.om.Item
getLength, head, itemAt, iterate, reduce, subsequence
-
Methods inherited from interface net.sf.saxon.om.NodeInfo
attributes, children, children, getGenre, isSameNodeInfo, isStreamed, iterateAxis, toShortString
-
Methods inherited from interface net.sf.saxon.om.Sequence
makeRepeatable
-
-
-
-
Method Detail
-
makeVirtualUntypedTree
public static VirtualCopy makeVirtualUntypedTree(NodeInfo original, NodeInfo root)
Public factory method: create a new untyped virtual tree as a copy of a node- Parameters:
original- the node (in the original tree) to be copiedroot- the node in the original tree corresponding to the root node of the virtual copy- Returns:
- the virtual copy.
-
getSchemaType
public SchemaType getSchemaType()
Get the type annotation of this node, if any. The type annotation is represented as SchemaType object.Types derived from a DTD are not reflected in the result of this method.
- Specified by:
getSchemaTypein interfaceNodeInfo- Overrides:
getSchemaTypein classVirtualCopy- Returns:
- For element and attribute nodes: the type annotation derived from schema validation (defaulting to xs:untyped and xs:untypedAtomic in the absence of schema validation). For comments, text nodes, processing instructions, and namespaces: null. For document nodes, either xs:untyped if the document has not been validated, or xs:anyType if it has.
- Since:
- 9.4
-
atomize
public AtomicSequence atomize() throws XPathException
Get the typed value.- Specified by:
atomizein interfaceItem- Specified by:
atomizein interfaceNodeInfo- Overrides:
atomizein classVirtualCopy- Returns:
- the typed value.
- Throws:
XPathException- if the node has no typed value, for example if it is an element node with element-only content- Since:
- 8.5
-
copy
public void copy(Receiver out, int copyOptions, Location locationId) throws XPathException
Description copied from class:VirtualCopyCopy this node to a given outputter- Specified by:
copyin interfaceNodeInfo- Overrides:
copyin classVirtualCopy- Parameters:
out- the Receiver to which the node should be copiedcopyOptions- a selection of the options defined inCopyOptionslocationId- Identifies the location of the instruction- Throws:
XPathException- if any downstream error occurs
-
wrap
protected VirtualCopy wrap(NodeInfo node)
Method to create the virtual copy of a node encountered when navigating. This method is separated out so that it can be overridden in a subclass.- Overrides:
wrapin classVirtualCopy- Parameters:
node- the node to be wrapped- Returns:
- a virtual copy of the node
-
isNilled
public boolean isNilled()
Determine whether the node has the is-nilled property- Specified by:
isNilledin interfaceNodeInfo- Overrides:
isNilledin classVirtualCopy- Returns:
- true if the node has the is-nilled property
-
-