[Bug 3369] [F+O] Operations on xs:duration

http://www.w3.org/Bugs/Public/show_bug.cgi?id=3369

           Summary: [F+O] Operations on xs:duration
           Product: XPath / XQuery / XSLT
           Version: Candidate Recommendation
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Functions and Operators
        AssignedTo: ashok.malhotra@oracle.com
        ReportedBy: mike@saxonica.com
         QAContact: public-qt-comments@w3.org


Section 10.1 of F+O wrongly states:

"Note that only equality is defined on xs:duration values."

This is no longer true: for example, we define casting operations and component
extraction on durations. It might be better to say "Note that no ordering
relation is defined on xs:duration values. Two xs:duration values may however
be compared for equality."

The spec doesn't seem to say how component extraction on durations works. For
example, given a duration of 90S, what does seconds-from-duration() return?
Test case fn-seconds-from-duration-20 assumes 30.0, which is reasonable, but I
can't find anything to back this up, and it runs contrary to the statement in
XML Schema that a duration is a 6-tuple. I suggest we add a statement that
days|hours|minutes|seconds-from-duration($d) returns the same as
days|hours|minutes|seconds-from-duration(xs:dayTimeDuration($d)), and
year|month-from-duration($d) returns the same as
year|month-from-duration(xs:yearMonthDuration($d))

Received on Monday, 19 June 2006 19:10:49 UTC