[Bug 3305] Cardinality +/* on range variables

http://www.w3.org/Bugs/Public/show_bug.cgi?id=3305





------- Comment #3 from davidc@nag.co.uk  2006-05-31 21:20 -------
>  a grammar change is not an option
I agree its too late for changes (although of course I'm not on the WG in any
case) but I think the proposed change in meaning would be very confusing
without a grammar change.

> from what I can tell the 'in' keyword in either way appears between the type and value:

I read the as expression as typing the _variable_ . The clause is
<variable> as <sequence type of value bound to variable>
so "in" doesn't come into the typing at that level.
I think that fits with most other uses of sequence type in xquery.

You want the clause to be read as
<variable> as <sequence type of sequence> in <sequence>
which inverts the order of the subterms putting the type before the value to
which it refers. I'm sure compilers could parse this, but I am less concerned
about them, more about people:-) I think it would be confusing (which is a
shame as I agree it would be useful to have the functionality).

David

Received on Wednesday, 31 May 2006 21:20:28 UTC