This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
http://www.w3.org/XML/Group/qtspecs/specifications/xquery-30/html/xquery-30.html#id-ns-nodes-on-elements I don't believe this error can be detected statically in the general case, and it is also unrelated to type errors.
The Working Group agrees. We will make this a dynamic error XQDY0102.
*** Bug 14957 has been marked as a duplicate of this bug. ***