Class JDOM2DocumentWrapper

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

    public class JDOM2DocumentWrapper
    extends GenericTreeInfo
    implements ActiveSource
    The tree information for a tree acting as a wrapper for a JDOM2 Document.
    9.7: this class no longer implements NodeInfo; the document node itself is now an instance of JDOM2NodeWrapper.
    • Field Detail

      • documentNumber

        protected long documentNumber
    • Constructor Detail

      • JDOM2DocumentWrapper

        public JDOM2DocumentWrapper​(org.jdom2.Document doc,
                                    Configuration config)
        Create a Saxon wrapper for a JDOM document
        doc - The JDOM document
        config - The Saxon Configuration
    • Method Detail

      • deliver

        public void deliver​(Receiver receiver,
                            ParseOptions options)
                     throws XPathException
        Implement the ActiveSource interface
        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 parsing fails for any reason. The detailed diagnostics will have been sent to the error reporter.
      • wrap

        public JDOM2NodeWrapper wrap​(java.lang.Object node)
        Wrap a node in the JDOM 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
      • 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 requesting the parent element of an ID-valued element
        the element node with the given ID if there is one, otherwise null.