Attribute constructor with empty QName

Bug #1018196 reported by Christian Gruen
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Zorba
Invalid
Undecided
Markos Zaharioudakis

Bug Description

The following query…

count((
  for $i in 1 to 10
  where attribute { 'a'[$i] } { () }
  return $i
))

…yields 10 instead of XPTY0004.

Hope this helps,
Christian

Chris Hillery (ceejatec)
Changed in zorba:
assignee: nobody → Markos Zaharioudakis (markos-za)
Revision history for this message
Markos Zaharioudakis (markos-za) wrote :

In Zorba, the compiler determines the static type of the attribute-construction expression as attribute-node(), and then the optimizer evaluates fn:boolean-of-attribute-node() as true, thus completely removing the where clause. We believe that according to the discussion in http://www.w3.org/TR/xquery-30/#id-errors-and-opt, this is not a bug.

Changed in zorba:
status: New → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.