Class 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
    • Constructor Detail

      • VirtualUntypedCopy

        protected VirtualUntypedCopy​(NodeInfo base,
                                     NodeInfo root)
        Protected constructor: create a virtual copy of a node
        base - the node to be copied
    • 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
        original - the node (in the original tree) to be copied
        root - the node in the original tree corresponding to the root node of the virtual copy
        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:
        getSchemaType in interface NodeInfo
        getSchemaType in class VirtualCopy
        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.
      • copy

        public void copy​(Receiver out,
                         int copyOptions,
                         Location locationId)
                  throws XPathException
        Description copied from class: VirtualCopy
        Copy this node to a given outputter
        Specified by:
        copy in interface NodeInfo
        copy in class VirtualCopy
        out - the Receiver to which the node should be copied
        copyOptions - a selection of the options defined in CopyOptions
        locationId - Identifies the location of the instruction
        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.
        wrap in class VirtualCopy
        node - the node to be wrapped
        a virtual copy of the node
      • isNilled

        public boolean isNilled()
        Determine whether the node has the is-nilled property
        Specified by:
        isNilled in interface NodeInfo
        isNilled in class VirtualCopy
        true if the node has the is-nilled property