This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
K2-NameTest-60 is: declare variable $input := <e/>; for $PI as processing-instruction() in $input//processing-instruction() return $PI I'm not seeing where the error is supposed to come from. Doesn't $input//processing-instruction() evaluate to an empty sequence. Then each item (i.e. one of them) are cast to processing-instruction(). It seems the "loop" should run zero times and produce the empty sequence. This is without static typing, but I'm don't know why there should be an error with static typing either.
An attempted fix has been committed to CVS, and should be part of XQTS_current.zip. Feel free to verify that the fix is acceptable, and if so, change status to CLOSED. If the attempted fix is not acceptable, reopen this report. If no opinion about this resolution is expressed within two weeks, it will be closed. Probably, the reason to why I thought it to be an error was that I expected a cardinality check to be applied by 'as processing-instruction()', but it is correct that cardinalities for range variables does nothing(as decided in 3305).
Seems to work now. Thanks.