#146 Parsing failure with "element and X"

v7.6
closed
Michael Kay
5
2012-10-08
2003-07-09
Michael Kay
No

A parsing failure occurs if the word "element" or
"attribute" is used as the name of an element or
attribute and is followed by an operator such as "and"
or "div". For example:

$x[@element and @code]

The problem arises because of the introduction of the
XQuery constructs "element E { ... }" and "attribute E
{ ... }".

Workaround: use parentheses, for example

$x[(@element) and @code]

test case added: bug02

Michael Kay

Discussion

  • Michael Kay
    Michael Kay
    2003-07-11

    Logged In: YES
    user_id=251681

    Fixed in 7.6.5