- From: <bugzilla@farnsworth.w3.org>
- Date: Tue, 27 May 2008 09:51:44 +0000
- To: public-qt-comments@w3.org
- CC:
http://www.w3.org/Bugs/Public/show_bug.cgi?id=5717 Summary: [F&O] Definition of op:divide-dayTimeDuration-by- dayTimeDuration and op:divide-yearMonthDuration-by- yearMonthDuration Product: XPath / XQuery / XSLT Version: Candidate Recommendation Platform: PC OS/Version: Windows NT Status: NEW Severity: normal Priority: P2 Component: Functions and Operators AssignedTo: mike@saxonica.com ReportedBy: oliver@cbcl.co.uk QAContact: public-qt-comments@w3.org op:divide-dayTimeDuration-by-dayTimeDuration is defined as follows [F&O 10.6.9]: Summary: Returns the result of dividing the value of $arg1 by $arg2. Since the values of both operands are decimals, the semantics of the division is identical to op:numeric-divide with xs:decimal operands. and here is the definition of op:divide-yearMonthDuration-by-yearMonthDuration [F&O 10.6.5]: Summary: Returns the result of dividing the value of $arg1 by $arg2. Since the values of both operands are integers, the semantics of the division is identical to op:numeric-divide with xs:integer operands. There is no reason that the implementation defined limits on xs:dayTimeDuration fall within the implementation defined limits of xs:decimal; similarly for xs:yearMonthDuration. Although it is obvious how a dayTimeDuration can be viewed as a decimal this is never explained anywhere in the document, and the phrase "since the values of both operands are decimals" is wrong. Does this also imply that the errors raised are those raised by op:numeric-divide (ie FOAR0002 for overflow, instead of FODT0002)? It does seem rather odd that dividing a dayTimeDuration by xs:double(0) return an FODT0002, but dividing a dayTimeDuration by xs:dayTimeDuration("P0S") returns an FOAR0001.
Received on Tuesday, 27 May 2008 09:52:20 UTC