Class AxiomDocument

  • All Implemented Interfaces:
    javax.xml.transform.Source, TreeInfo

    public class AxiomDocument
    extends GenericTreeInfo
    Information about a tree that wraps an AXIOM document
    • Constructor Detail

      • AxiomDocument

        public AxiomDocument​(org.apache.axiom.om.OMDocument root,
                             java.lang.String baseURI,
                             Configuration config)
        Create a Saxon wrapper for an Axiom document node
        Parameters:
        root - The Axiom root node
        baseURI - The base URI for all the nodes in the tree
        config - The configuration which defines the name pool used for all names in this tree
    • Method Detail

      • wrap

        public NodeInfo wrap​(org.apache.axiom.om.OMNode node)
        Wrap a node in the Axiom document.
        Parameters:
        node - The node to be wrapped. This must be a node in the same document (the system does not check for this).
        Returns:
        the wrapping NodeInfo object
      • makeWrapper

        protected static NodeInfo makeWrapper​(org.apache.axiom.om.OMNode node,
                                              AxiomDocument docWrapper,
                                              AxiomParentNodeWrapper parent,
                                              int index)
        Factory method to wrap an Axiom node with a wrapper that implements the Saxon NodeInfo interface.
        Parameters:
        node - The Axiom node (an element, text, processing-instruction, or comment node)
        docWrapper - The wrapper for the Document containing this node
        parent - The wrapper for the parent of the Axiom node. May be null if not known.
        index - The position of this node relative to its siblings. May be -1 if not known
        Returns:
        The new wrapper for the supplied node
      • selectID

        public NodeInfo selectID​(java.lang.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 the parent of the selected node is required (for element-with-id)
        Returns:
        the element with the given ID, or null if there is no such ID present (or if the parser has not notified attributes as being of type ID).