John Merrells wrote:

>
> > I really can't see how this might happen. You should always have an
> > executation context like XSLT or the like. We only use XPath to
> > evaluate the context node, i.e. select one or more node/elements.
> > But your're right here: this question just not come up before.
>
> Yes there will always be an execution context. XPath could be
> being used within XSLT, or XQuery, or it could be being used
> standalone to filter documents in a collection. But, yes, even in
> that case there's an execution context. So, say my context has
> $foo bound to 'bar', and my XPath expression refers to $foo.
> How using XPathQueryService do I pass the variable bindings
> from my execution environment through to the XPath query
> service? The namespace prefix to uri mapping is also within
> the execution context, but in this case there are a set of methods
> provided for passing that through to the execution engine...
>

Currently you cannot use variables. Similarly in XPointer, which leverages
XPath, there is no way to bind a variable to a value, though XPointer does
include a mechanism to specify namespace bindings. It would be an
improvement on the XPathQueryService to allow specification of a variable
bindings.

Probably the method signatures:

    void setValue(String varname, Object value) throws...
    Object getValue(String varname) throws ...

Jonathan


----------------------------------------------------------------------
Post a message:         mailto:[EMAIL PROTECTED]
Unsubscribe:            mailto:[EMAIL PROTECTED]
Contact administrator:  mailto:[EMAIL PROTECTED]
Read archived messages: http://archive.xmldb.org/
----------------------------------------------------------------------

Reply via email to