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 multiplication operator here fails to typecheck becuase local:multiplySequence is typed as item()*. (:*******************************************************:) (: Test: K2-FunctionProlog-9 :) (: Written by: Frans Englich :) (: Date: 2007-01-15T15:15:45+01:00 :) (: Purpose: A recursive function multiplying a sequence. :) (:*******************************************************:) declare function local:multiplySequence($input) { if (empty($input)) then 1 else $input[1] * local:multiplySequence($input[position() != 1]) }; local:multiplySequence((1, 2, 3, 4, 5))
A fix has been attempted in CVS, and XQTS_current.zip has been updated to contain the new change. If it can be verified that the change is correct, it would be appreciated. If this resolution is satisfiable, feel free to change status to closed. Otherwise, reopen this report. If no opinion on the resolution is expressed within two weeks, I will change status to closed. This change to this report was part of a batch-change of several reports.
This still fails. I suggest: declare function local:multiplySequence($input as xs:integer*) as xs:integer which ensures that the multiplication operator will type check correctly.
A new attempt has been committed to CVS(see comment #1).
K2-FunctionProlog-9 is now fixed. Thanks.