Class AxiomDocument

    • Constructor Detail

      • AxiomDocument

        public AxiomDocument​( root,
                             java.lang.String baseURI,
                             Configuration config)
        Create a Saxon wrapper for an Axiom document node
        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

      • deliver

        public void deliver​(Receiver receiver,
                            ParseOptions options)
                     throws XPathException
        Implement ActiveSource by delivering the document to a supplied receiver
        Specified by:
        deliver in interface ActiveSource
        receiver - the receiver to which events representing the parsed XML document will be sent
        options - options for parsing the source
        XPathException - if things don't work out
      • wrap

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

        protected static NodeInfo makeWrapper​( node,
                                              AxiomDocument docWrapper,
                                              AxiomParentNodeWrapper parent,
                                              int index)
        Factory method to wrap an Axiom node with a wrapper that implements the Saxon NodeInfo interface.
        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
        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
        selectID in class GenericTreeInfo
        id - the required ID value
        getParent - true if the parent of the selected node is required (for element-with-id)
        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).