The signatures of: op:subtract-dateTimes op:subtract-dates op:subtract-times all have xs:dayTimeDuration? return type. Unless I'm mistaken, these functions can never return the empty sequence and should therefore have return type xs:dayTimeDuration,
I think you are correct. Of course, these functions are only an internal formalism so there is no direct effect on users.
The WGs agreed today to make the change of removing the "?" from the result type signature of these functions. I am therefore closing the bug report. Michael Kay for the XSL and XQuery WGs
For the record, op:subtract-times appears to have the correct signature already; the other two are wrong. Michael Kay
*** Bug 4927 has been marked as a duplicate of this bug. ***
This will appear as erratum FO.E5