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 3777 - declare variable $input-context1 external;
Summary: declare variable $input-context1 external;
Status: CLOSED INVALID
Alias: None
Product: XML Query Test Suite
Classification: Unclassified
Component: XML Query Test Suite (show other bugs)
Version: 1.0
Hardware: PC Windows XP
: 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: 2006-09-29 14:04 UTC by Tim Mills
Modified: 2006-10-16 11:48 UTC (History)
0 users

See Also:


Attachments

Description Tim Mills 2006-09-29 14:04:03 UTC
Refering to a variable declaration of the form:

declare variable $x external;

the XQuery spec states in:

http://www.w3.org/TR/xquery/#id-variable-declarations

that:

"During query analysis, the type of $x is considered to be item()*. "

Thus XQTS tests which start:

declare variable $input-context external;

and use an expression such as $input-context/.... fail typechecking, since such an expression requires node()*, not the more general item()*.

XQTS tests should therefore be changed to use, for example:

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

Axes001-1 is an example of such a test.
Comment 1 Frans Englich 2006-09-29 14:20:14 UTC
The guidelines says in section Accessing Source Documents:

----------------------------------------
A test harness may use any of the following customizations of the query that is supplied. Note that option 3 and 5 are only applicable for test cases that use one source document.

1. Unchanged: use external variables as indicated in the original query. 
Users of static typing may choose to transform the variable declarations between insert-start and insert-end comments by adding an "as document-node()" clause as illustrated below:
----------------------------------------

So I believe you will need to transform it from your side. One way to do this is to provide the static type for the variable from your external environment. (If you think this is cumbersome I personally agree!)

Therefore I lean towards resolving this report as invalid.
Comment 2 Tim Mills 2006-10-02 08:04:31 UTC
OK.