[Bug 3532] fn-collection tests

http://www.w3.org/Bugs/Public/show_bug.cgi?id=3532


mike@saxonica.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED




------- Comment #5 from mike@saxonica.com  2006-07-25 12:08 -------
Trying to guess what the test driver is supposed to do, in the absence of any
documentation. Looking at the intent of fn-collection-10, the query reads like
this:

(: Name: fn-collection-10 :)
(: Description: Test that two uses of fn:collection are stable.:)

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

let $c1 := $input-context
let $c2 := $input-context 
for $c at $p in $c1
return $c is $c2[$p]

My first thought was to modify it to say:


declare variable $input-context := collection('collection2');

But the intent of the test seems to be that collection() is called twice, so
instead it's the references to $input-context that must be changed:

let $c1 := collection('collection2')
let $c2 := collection('collection2')

Is this the correct interpretation?

Couldn't the text that needs to be replaced in the query be flagged by some
more distinctive markup, rather than making it look like an XQuery variable
reference? For example

let $c1 := ##input-context##

or even

let $c1 := collection('##input-context##')

Will the name of the variable always be "input-context"?

? 

Received on Tuesday, 25 July 2006 12:08:37 UTC