This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
This test, which aims to test the resolution of Bug 5651, should probably expect FORG0006 rather than XPTY0004 in keeping with fn:boolean. (:*******************************************************:) (:Name: statictyping-24 :) (:Written By: Sorin Nasoi :) (:Description: Evaluation of static typing feature within:) (:a "where" clause. :) (:Wrong operand for expression (uses fn:not) :) (:*******************************************************:) (: insert-start :) declare variable $input-context1 external; (: insert-end :) let $var := ("a","b","c") where fn:not($var) eq fn:true() return $var
This test expects FORG0006, not XPTY0004 as stated in the cat/STFLWORExpr.xml: <test-case is-XPath2="false" name="statictyping-24" FilePath="StaticTyping/STFLWORExpr/" scenario="runtime-error" [...] <expected-error>FORG0006</expected-error> </test-case>
In a static typing implementation the error that should be raised is XPTY0004, and not FORG0006. Since this is a static-typing query the expected error should be changed to XPTY0004. This is because the only static typing rule for fn:boolean is: statEnv |- Type <: (empty | NodeType+ | xs:boolean | xs:string | xs:untypedAtomic | fs:numeric | xs:anyURI) -------------------------------------------------- statEnv |- (FN-URI,"boolean")(Type) : xs:boolean and so the query should result in a static type error (XPTY0004)