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 7921 - [XQTS] CVS: errors in TestSources modules
Summary: [XQTS] CVS: errors in TestSources modules
Status: CLOSED 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: John Snelson
QA Contact: Mailing list for public feedback on specs from XSL and XML Query WGs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-10-14 16:34 UTC by Tim Mills
Modified: 2010-03-16 16:03 UTC (History)
0 users

See Also:


Attachments

Description Tim Mills 2009-10-14 16:34:14 UTC
There are missing dollar signs in the following module variable declarations.

errata6-module4.xq:declare variable errata6_4:var as a:hatsize := a:hatsize(3);
errata8-module1b.xq:declare variable errata8_1b:var := errata8_1a:fun();
errata8-module2b.xq:declare variable errata8_2b:var := errata8_2a:fun2();
Comment 1 John Snelson 2009-10-15 21:04:02 UTC
Fixed.
Comment 2 Tim Mills 2009-10-16 15:09:05 UTC
Thanks.

I suspect that the errata6-004.xq should omit the "import schema" declaration if XQST0036 is the expected result.

(:*******************************************************:)
(: Description: Test of XQST0036 for unknown simple type in imported global vari
able :)
(:********************************************************** :)

(: insert-start :)
import module namespace errata6_4="http://www.w3.org/TestModules/errata6-4";
import schema namespace a = "http://www.w3.org/XQueryTest/userDefinedTypes";
declare variable $input-context external;
(: insert-end :)

$errata6_4:var
Comment 3 Tim Mills 2009-10-16 15:27:46 UTC
Could you please explain why test errata8-002 does not exhibit a circularity?

[Definition: A module M1 directly depends on another module M2 (different from M1) if a variable or function declared in M1 depends on a variable or function declared in M2.] It is a static error [err:XQST0093] to import a module M1 if there exists a sequence of modules M1 ... Mi ... M1 such that each module directly depends on the next module in the sequence (informally, if M1 depends on itself through some chain of module dependencies.)


Module errata8_2a declares function errata8_2a:fun() which depends on  $errata8_2b:var.  Therefore errata8_2a depends on errata8_2b

Module errata8_2b declared variable errata8_2b:var which depends on errata8_2a:fun2().  Therefore errata8_2b depends on errata8_2a.

This gives us the sequence of modules:

errata8_2a ... errata8_2b ... errata8_2a

which exhibits the circularity.

Or am I mistaken?





Comment 4 John Snelson 2010-02-10 00:50:05 UTC
(In reply to comment #2)
> I suspect that the errata6-004.xq should omit the "import schema" declaration
> if XQST0036 is the expected result.

Fixed.

(In reply to comment #3)
> Could you please explain why test errata8-002 does not exhibit a circularity?
> 
> [Definition: A module M1 directly depends on another module M2 (different from
> M1) if a variable or function declared in M1 depends on a variable or function
> declared in M2.] It is a static error [err:XQST0093] to import a module M1 if
> there exists a sequence of modules M1 ... Mi ... M1 such that each module
> directly depends on the next module in the sequence (informally, if M1 depends
> on itself through some chain of module dependencies.)
> 
> 
> Module errata8_2a declares function errata8_2a:fun() which depends on 
> $errata8_2b:var.  Therefore errata8_2a depends on errata8_2b
> 
> Module errata8_2b declared variable errata8_2b:var which depends on
> errata8_2a:fun2().  Therefore errata8_2b depends on errata8_2a.
> 
> This gives us the sequence of modules:
> 
> errata8_2a ... errata8_2b ... errata8_2a
> 
> which exhibits the circularity.
> 
> Or am I mistaken?

You're correct, although I thought the test should pass. I'm keeping that test the way it is as it makes an interesting test case, and adding a new pass scenario.
Comment 5 Tim Mills 2010-02-10 11:30:33 UTC
errata6-004 is fixed - thanks.

errata8-002 appears to have some excess whitespace in its expected result. 

Expected '10
', was '10'
Comment 6 John Snelson 2010-02-10 12:10:27 UTC
(In reply to comment #5)
> errata8-002 appears to have some excess whitespace in its expected result. 
> 
> Expected '10
', was '10'

Fixed.