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 4186 - Static typing of fn-collection-10, 10d
Summary: Static typing of fn-collection-10, 10d
Status: CLOSED FIXED
Alias: None
Product: XML Query Test Suite
Classification: Unclassified
Component: XML Query Test Suite (show other bugs)
Version: 1.0.2
Hardware: PC Windows XP
: 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: 2007-01-10 16:52 UTC by Tim Mills
Modified: 2007-09-14 12:52 UTC (History)
0 users

See Also:


Attachments

Description Tim Mills 2007-01-10 16:52:03 UTC
The second argument ($c2[$p]) to operator "is" is statically typed as a zero-or-more sequence.  The formal semantics rules only permit the normalization of this sort of expression to a subsequence when the predicate is a numeric literal or fn:last() (i.e. not for any numeric argument).  Can anyone comment on why this restriction is necessary?


(: 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 := fn:collection($input-context)
let $c2 := fn:collection($input-context)
for $c at $p in $c1
return $c is $c2[$p]
Comment 1 Michael Rys 2007-01-11 01:03:19 UTC
From a strict point of view it is not necessary and implementations could do better by determining it based on the inferred type and the class of the expression (if it is int and not a context item sensitive expression such as position()). But we felt that from a simplicity point of view of the spec this rule was good enough for v1.

Best regards
Michael (speaking for himself)
Comment 2 Carmelo Montanez 2007-03-09 16:42:07 UTC
hey Tim:

Thanks for the comment.  Looks like nothing else needs to be done with this case.  I am closing the bug.  Please comment if I am mistaken.

Thanks,
Carmelo
Comment 3 Carmelo Montanez 2007-03-09 16:42:34 UTC
hey Tim:

Thanks for the comment.  Looks like nothing else needs to be done with this case.  I am closing the bug.  Please comment if I am mistaken.

Thanks,
Carmelo
Comment 4 Tim Mills 2007-03-09 16:54:06 UTC
Under the current rules, this test fails static typing.  Could it please be corrected to pass with the static typing feature enabled?
Comment 5 Frans Englich 2007-09-14 09:34:52 UTC
A fix has been attempted in CVS, XQTS_current.zip is updated.

If the resolution is satisfactory, feel free to change status to CLOSED. Otherwise, reopen this report. If no feedback is returned within two weeks, status will be changed to CLOSED. Thanks for reporting!
Comment 6 Tim Mills 2007-09-14 12:52:46 UTC
Thanks.