[xquery-talk] XQuery and Item Orientation

Ghislain Fourny gfourny at inf.ethz.ch
Fri Feb 6 21:35:50 PST 2009

Hello Hans-Juergen,

Yes, I agree with you, this is a drawback. For users writing complex  
queries, it is not necessarily clear what the context item is, so that  
with our notation (the same for function calls and method/item- 
function calls) a user might perform a method/item-function call  
without being aware of it. I like your idea of making item-function  
calls explicit with another notation, which solves this problem. In  
addition, XQuery does make a difference between variables (with a $)  
and access to children of the context item (without a $), so it makes  
sense to also make a difference between functions and methods/item- 
functions, it would be a nice symmetry.

Kind regards,
Ghislain Fourny

Am 30.01.2009 um 08:16 schrieb Hans-Juergen Rennau:

> The predictability would of course be the same as with XML Schema -  
> total. But perhaps I should point out one difference between your  
> approach and mine (if I understood you correctly): you chose to make  
> any function call potentially an item function call, with the  
> current context item providing the "candidate item". You wrote:
>   $triangle/rotate()
> whereas I prefer to make item calls explicit:
>   $triangle/.->rotate()
> This does play a role in terms of lucidity, dont't you think?

More information about the talk mailing list