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

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





------- Comment #2 from mike@saxonica.com  2006-07-02 04:10 -------
This was discussed at the F2F meeting in Saclay. We agreed that component
extraction functions on xs:duration should return the normalized duration. I
was actioned to post specific test for the editor to apply.

(a) In Section 10.1, replace "Note that only equality is defined on xs:duration
values." by "Note that no ordering relation is defined on xs:duration values.
Two xs:duration values may however be compared for equality. Operations on
durations (including equality comparison, casting to string, and extraction of
components) all treat the duration as normalized: for example, a duration of
120 seconds always gives the same result as a duration of two minutes.

(b) In 10.5, add at the end of the introductory paragraph ("The duration, date
and time datatypes may be considered ... For the date/time datatypes the local
value is used.") the sentence: "For xs:duration and its subtypes, including the
two subtypes xs:yearMonthDuration and xs:dayTimeDuration, the components are
normalized: this means that the seconds and minutes components will always be
less than 60, the hours component less than 24, and the months component less
than 12.

(c) In the description of the individual component extraction functions such as
years-from-duration, delete the reference to the canonical lexical
representation (because XML Schema does not define such a representation).
Instead say (for fn:years-from-duration): 

<text>
Summary: Returns an xs:integer representing the years component in the value of
$arg. 

The result is given by casting $arg to an xs:yearMonthDuration (see 17.1.4) and
then computing the years component as described in 10.3.1.3.

The result may be negative.

If $arg is an xs:dayTimeDuration, returns 0.

If $arg is the empty sequence, returns the empty sequence.
</text>

For the other five component extraction the text is the same, mutatis mutandis.

Received on Sunday, 2 July 2006 04:10:38 UTC