This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 6509 - K2-ExternalVariablesWith-23
Summary: K2-ExternalVariablesWith-23
Status: RESOLVED FIXED
Alias: None
Product: XML Query Test Suite
Classification: Unclassified
Component: XML Query Test Suite (show other bugs)
Version: unspecified
Hardware: PC Windows NT
: P2 normal
Target Milestone: ---
Assignee: Frans Englich
QA Contact: Mailing list for public feedback on specs from XSL and XML Query WGs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-01-30 22:32 UTC by Michael Kay
Modified: 2009-10-13 14:07 UTC (History)
3 users (show)

See Also:


Attachments

Description Michael Kay 2009-01-30 22:32:54 UTC
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.
Comment 1 Tim Mills 2009-02-11 17:12:37 UTC
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
Comment 2 Michael Dyck 2009-02-11 21:30:27 UTC
(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.
Comment 3 Tim Mills 2009-02-12 10:27:31 UTC
Thanks - I did mean element(e, xs:anyType).
Comment 4 Oliver Hallam 2009-02-24 11:47:03 UTC
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.
Comment 5 Frans Englich 2009-10-13 13:16:28 UTC
Seems to have been fixed in CVS on 2009/01/12 by me, but the report was never closed.
Comment 6 Tim Mills 2009-10-13 13:21:49 UTC
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'." />
Comment 7 Frans Englich 2009-10-13 13:27:14 UTC
Yupp, maybe better now? :)
Comment 8 Tim Mills 2009-10-13 14:07:46 UTC
Fixed now, thanks.