I have to use node as an external parameter in Xquery
In the XQuery I have a path as follows , where the root node has to be given from the Java class


I did the following
1) created a node in the Java class as follows
        DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
        DocumentBuilder builder = factory.newDocumentBuilder();
            Document document1 = builder.newDocument();
            Element root = document1.createElement("dprdataset");
        dynamicContext.setParameter("root", root)
2) In the XQuery defined the following ,
        declare variable $root as node() external;
        but I am not getting the value of root as dprdataset in my XQuery

Tell me what I can do for this.