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 7216 - [XQTS] ST-Axes* tests do not specify types of external variables
Summary: [XQTS] ST-Axes* tests do not specify types of external variables
Status: RESOLVED INVALID
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: Andrew Eisenberg
QA Contact: Mailing list for public feedback on specs from XSL and XML Query WGs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-08-05 13:24 UTC by Oliver Hallam
Modified: 2009-08-17 18:33 UTC (History)
0 users

See Also:


Attachments

Description Oliver Hallam 2009-08-05 13:24:44 UTC
ST-Axes001 is as follows:

(: Name: ST-Axes001 :)
(: Description: self:: axis with explicit name test called on set of nodes which do not contain any nodes of this name :)

(: insert-start :)
declare variable $input-context external;
(: insert-end :)

fn:count($input-context//center/self::nowhere)


Note that as the query stands, the static type of $input-context is not declared and so it defaults to item();

Whilst it is acceptable for a test harness to rewrite the declaration, for example to:

declare variable $input-context as node() external;

this should not be necessary in order to pass a test.

Since this test is for the static typing feature, I suggest that the type of the argument should be more explicit, either by specifying it in the declaration (which could break some test harnesses), or by an explicit treat as in the query:

fn:count($input-context treat as node()//center/self:nowhere)


This same problem occurs in ST-Axes001 - ST-Axes015
Comment 1 Andrew Eisenberg 2009-08-17 18:33:22 UTC
As you've noted, our guidelines allow a test harness to add "as document-node()" to an external variable declaration to allow static typing implementations to execute the tests correctly. We responded to this issue once before in Bug #3777.

I'd like not to make any changes here and instead place the burden on your test harness.

Please close this bug if you agree with this resolution.