Content-Transfer-Encoding: 7bit
Stan Pinte wrote:
How can I do the following in Qexo, using the Java embedding (i.e.
calling XQuery xq = new XQuery();, xq.eval()):
-how can I pass the interpreter some parameters
-how can I pass it an XML DOM node, to use as query context
You may be in (partial) luck. Next on my Qexo list is adding methods to
the XQuery class that are like eval but being able to set the context. I
have a rough sketck of the implementation already.
Note that this would (at least initially) only support using the Qexo data
types for nodes. Qexo does not support org.w3c.dom.Node. You "write"
such a Node using SAX, and create the Qexo representation from the SAX
stream, but (for now) you have to put the pieces together yourself.
Your other question about passing parameters is also something I'm
thinking about. It is possible (but not documented) to get a XQuery
function as a gnu.mapping.Procedure object and you can pass parameters to
that using apply.
I also want to implement external global variables. I.e. implement:
declare variable $foo external;
The issue here is exactly how to provide the external value for
$param. I'm thinking of a command-line flag:
--param foo value
but there are complications (such as namespace handling).
--
--Per Bothner
address@hidden http://per.bothner.com/
--
Incoming mail is certified Virus Free.
Checked by AVG Anti-Virus (http://www.grisoft.com).
Version: 7.0.193 / Virus Database: 260.2.2 - Release Date: 27/10/2003