qexo-general
[Top][All Lists]
Advanced

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

Re: [Qexo-general] How to use fn:input()


From: Per Bothner
Subject: Re: [Qexo-general] How to use fn:input()
Date: Wed, 29 Jan 2003 10:00:16 -0800
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2) Gecko/20021202

Denis Goeury wrote:
XQuery xq = new XQuery();
xq.setInput(source);

Where 'source' could be an InputStream, URL, File, Reader,

That means building in an assumption that the source has XML
syntax.  A reasonable default, but not the only possibility.

I also like the concept of XQueryContext used by
Oracle because it clearly separates the context from the query itself.

But what is the XQueryContext?  The context includes all the context
that might effect the evaluation.  That could be anything.  The
problem with an explicit XQueryContext is now you have to pass it
around everywhere.  I think it makes more sense to make the
context implicit - as it is in the XQuery language.  I.e. the
context is associated with the current thread.  In Kawa that means
the current CallContext and indirectly the current Interpreter
and current Environment.  (Admittedly, the Qexo model and
implementation of these concepts needs some work.)

The problem with fn:input() is that it still gives only one input
source.

fn:input() is specified to return a sequence of nodes.  So you
could bind multiple sources to it, if you had the appropriate
Java API.
--
        --Per Bothner
address@hidden   http://www.bothner.com/per/





reply via email to

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