Re: XQuery: Ambiguous expression using "context"

Hi Twan.  Thank you for the report.

public-qt-comments-request@w3.org wrote on 01/23/2003 11:19:48 AM:
>      if (A) then B instance of element C context type else/D
> According to precedence rules, should be interpreted the same as:
>      if (A) then (B instance of element C context type else/D)
> However, this is not a valid expression, since there is no 'else' in if
> expression.

Right, and neither is the first one.  The lex rules (admitting that there
were some massive bugs in the lex tables in the last public draft)
determine that "else" occurs in a position where a QName is expected, as
opposed to the keyword "else" expected in the OPERATOR state.

The following parses fine, and as expected:

if (A) then B instance of element C context type else/D else /D

So, at least in the current draft (as opposed to the last public draft), I
don't see any problem.

Also double-checked that your:

>      if (A) then (B instance of element C context type) else (/D)

Parses OK.  It does.

Note there are some ambiguity bugs with Sequence type for keywords vs.
QNames, such as "element" etc.  We're working on a solution for this.

Thank you again for your feedback!

-scott

Received on Sunday, 26 January 2003 22:43:52 UTC