[Bug 3832] Static typing in use cases

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





------- Comment #1 from mike@saxonica.com  2006-10-13 16:38 -------
>where contains($t/text(), "XML")

This is one of the few cases reported where static typing is quite right to
reject the query. This use of /text() in the published use cases is really bad
coding style and has been slavishly copied by large sections of the XQuery user
community. It's wrong, of course, because it fails when an element contains
comments or PIs. It's too late to undo the damage now, but such tests should be
changed to say

where contains(string($t), "XML")

Michael Kay

Received on Friday, 13 October 2006 16:38:17 UTC