This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
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]
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)
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
Under the current rules, this test fails static typing. Could it please be corrected to pass with the static typing feature enabled?
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!
Thanks.