[xquery-talk] flowrrr - how to structure a function?
John Snelson
jsnelson at sleepycat.com
Tue Oct 17 15:35:58 PDT 2006
Hi Robert,
It shouldn't matter which order functions are evaluated in, since XQuery
functions are meant to be side-effect free. In the case of your query,
what that means is that the attribute setting and redirection should be
queued up to be executed after the query has finished - this is what
happens in the XQuery Update specification.
As it happens, all the functions that you use are probably just setting
name-value pairs to be output in the HTTP response header, so their
order won't matter there either.
John
Robert Koberg wrote:
> I wonder how other processors work. I read somewhere that you can use
> Saxon as eXist's XQuery processor, which I intend to do for validity and
> performance comparisons.
>
> Do other processors evaluate sequences in order?
>
>>>> So theoretically an XQuery engine might choose to first evaluate
>>>> session:set-attribute($project-key,
>>>> $group-name),response:redirect-to(xs:anyURI("./project/"))
>>>>
>> FYI. I asked on the eXist list and Wolfgang Meier responded with:
>>
>> "No. The functions will be evaluated in the same order as they are
>> added to the sequence. No problem here."
>>
>
> -Rob
>
> _______________________________________________
> talk at x-query.com
> http://x-query.com/mailman/listinfo/talk
More information about the talk
mailing list