This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
The substance of this test is declare variable $v as element(notWildCard, xs:untyped?)+ := <e/> and the test expects this to be successful. It is a type error because the element name does not match the required name.
K2-ExternalVariablesWith-22 has a related problem. With the default construction mode of "preserve" the actual type of <e/> in each of these examples is element(e, xs:anyAtomicType). (:*******************************************************:) (: Test: K2-ExternalVariablesWith-22 :) (: Written by: Frans Englich :) (: Date: 2007-11-22T11:31:21+01:00 :) (: Purpose: A complex type declaration. :) (:*******************************************************:) declare variable $v as element(*, xs:untyped?)+ := <e/>; 1
(In reply to comment #1) > With the default construction mode of "preserve" the actual type > of <e/> in each of these examples is element(e, xs:anyAtomicType). If construction mode is preserve, the type annotation (type-name) of a constructed element node is xs:anyType, so the actual type of <e/> would be element(e, xs:anyType). But I don't think that makes a difference to the problem you raise.
Thanks - I did mean element(e, xs:anyType).
In both these tests, the variable is never used. Under dynamic typing mode an implementation is free to never evaluate the definition of the global variable, and so never encounter the type error. Thus I think "1" is also a valid result for both these tests.
Seems to have been fixed in CVS on 2009/01/12 by me, but the report was never closed.
I'm still seeing an error in K2-ExternalVariablesWith-23 Expected success, was XPTY0004: Type check error. The declared type of variable '$v' in namespace '' is 'element notWildCard nillable of type http://www.w3.org/2001/XMLSchema:untyped+' but its value has type 'element e of type http://www.w3.org/2001/XMLSchema:anyType'." />
Yupp, maybe better now? :)
Fixed now, thanks.