qexo-general
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qexo-general] Re: Quexo question


From: Per Bothner
Subject: [Qexo-general] Re: Quexo question
Date: Thu, 30 Oct 2003 10:35:05 -0800
User-agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.5b) Gecko/20030827

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/






reply via email to

[Prev in Thread] Current Thread [Next in Thread]