W3C home > Mailing lists > Public > public-qt-comments@w3.org > January 2007

[Bug 3971] More XQTS static type errors

From: <bugzilla@wiggum.w3.org>
Date: Thu, 11 Jan 2007 17:14:34 +0000
CC:
To: public-qt-comments@w3.org
Message-Id: <E1H53Va-0003w5-KQ@wiggum.w3.org>

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





------- Comment #7 from tim@cbcl.co.uk  2007-01-11 17:14 -------
I believe nametest-9 to be correct.  Quoting from the formal semantics spec,

"A computed element constructor creates a new element with either the type
annotation xs:untyped (in strip construction mode), or with the type annotation
xs:anyType (in preserve construction mode)"

and therefore that the type assigned to $var does not permit you to deduce the
error "path does not contain empty-node-list".

: Name: nametest-9 :)
(: Description: Name test that attempts to select non-existent nodes from a
newly constructed.:)
(: Use fn:count to avoid empty file.  :)

(: insert-start :)
declare variable $input-context1 as document-node() := document { <doc/> };
(: insert-end :)

let $var := <a attr1 = "abc1"><b attr2 = "abc2">context2</b></a>
return
  fn:count(($var/empty-node-list)[1])
Received on Thursday, 11 January 2007 17:14:39 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 15:45:32 UTC