Hi there,

In my application I have this method:

public static String getAllPartsAsTree(String a) throws XQException, XQQueryException
    { 
        XQConnection con = Connection.getConnection();
        XQExpression xqe = con.createExpression();
       
        xqe.bindString(new QName("b"), a, null);

        String xqueryString =
                 "import module namespace lib=\"http://www.example.com/library_module\";"  +
                 "declare option output:method \"xhtml\";" +
                 "declare variable $b external; " +
                 "lib:gethtml($b)";

        XQResultSequence rs = xqe.executeQuery(xqueryString)
;

        String b = rs.getSequenceAsString(null);
       
        con.close();
       
        return b;
    }

When I run the app I get the following error message:

Exception in thread "main" javax.xml.xquery.XQException: The prefix "output" is unknown in this static context.

I can't understand how to interpret the error message.
The same query in BaseXGUI works perfectly.
I hope someone can help me.
Thanks!