qexo-general
[Top][All Lists]
Advanced

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

Re: [Qexo-general] Globals


From: Per Bothner
Subject: Re: [Qexo-general] Globals
Date: Mon, 21 Apr 2003 08:57:59 -0700
User-agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.3) Gecko/20030312

Seshukumar Venkata Adiraju wrote:
Can define be used to change a value of a binding after it is defined
once.

Can I do something like,

xq.define("var1", "value1");

And then later
xq.define("var1", "value2");

It should work, but I'd recommend against it.  Since XQuery is
a side-effect-free language, the implementation is free to treat
a variable as constant - depending of course on how it is called.
(It's probably ok but inefficient if you re-parse the query.)

In my application I'm presenting the user a list of values from which he
selects.
The user might come back to this and change his selection and execute
xquery again.

In that case, I think it would be better to compile a function (as
I showed in previous email), and call it with different parameters.

A stable, documented, and efficient ABI (i.e. the Java-equivalent
result of compiling XQuery) is not really a feature of Qexo yet,
but it will be one of the main goals fo the 1.8 version.


--
        --Per Bothner
address@hidden   http://per.bothner.com/






reply via email to

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