Class TypeStrippedDocument

java.lang.Object
net.sf.saxon.om.GenericTreeInfo
net.sf.saxon.tree.wrapper.TypeStrippedDocument
All Implemented Interfaces:
Source, TreeInfo

public class TypeStrippedDocument extends GenericTreeInfo
A TypeStrippedDocument represents a view of a real Document in which all nodes are untyped
  • Constructor Details

    • TypeStrippedDocument

      public TypeStrippedDocument(TreeInfo doc)
      Create a type-stripped view of a document
      Parameters:
      doc - the underlying document
  • Method Details

    • wrap

      public TypeStrippedNode wrap(NodeInfo node)
      Create a wrapped node within this document
      Parameters:
      node - the node to be wrapped
      Returns:
      the wrapped node
    • getDurability

      public Durability getDurability()
      Description copied from interface: TreeInfo
      Get the durability of nodes in the tree. This affects how they are handled in a memo function cache, to optimize memory and garbage collection. By default, all nodes are considered durable unless otherwise specified
      Specified by:
      getDurability in interface TreeInfo
      Overrides:
      getDurability in class GenericTreeInfo
      Returns:
      the durability property of this node tree
    • selectID

      public NodeInfo selectID(String id, boolean getParent)
      Get the element with a given ID, if any
      Specified by:
      selectID in interface TreeInfo
      Overrides:
      selectID in class GenericTreeInfo
      Parameters:
      id - the required ID value
      getParent - true if running the element-with-id() function rather than the id() function; the difference is that in the case of an element of type xs:ID, the parent of the element should be returned, not the element itself.
      Returns:
      the element with the given ID value, or null if there is none.