<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://www.w3.org/Bugs/Public/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4"
          urlbase="https://www.w3.org/Bugs/Public/"
          
          maintainer="sysbot+bugzilla@w3.org"
>

    <bug>
          <bug_id>26926</bug_id>
          
          <creation_ts>2014-09-29 12:01:07 +0000</creation_ts>
          <short_desc>[F+O] 3.1 Components of a Duration</short_desc>
          <delta_ts>2014-11-17 09:59:32 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>XPath / XQuery / XSLT</product>
          <component>Functions and Operators 3.1</component>
          <version>Working drafts</version>
          <rep_platform>PC</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>CLOSED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>minor</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Michael Kay">mike</reporter>
          <assigned_to name="Michael Kay">mike</assigned_to>
          
          
          <qa_contact name="Mailing list for public feedback on specs from XSL and XML Query WGs">public-qt-comments</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>112379</commentid>
    <comment_count>0</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2014-09-29 12:01:07 +0000</bug_when>
    <thetext>Now that the dayTimeDuration and yearMonthDuration types are defined in XSD, we need to change the text in the specification of functions such as days-from-duration() to cut out the reference to the F+O specifications of these types (which at the time of writing is currently a broken link).

The specification says: 

The result is obtained by casting $arg to an xs:dayTimeDuration (see 19.1.3 Casting to duration types) and then computing the days component as described in 8.1.2.3 Canonical representation.

But the specification of casting says: 

If ST is xs:duration, or a type derived from duration, but not xs:yearMonthDuration or a type derived from xs:yearMonthDuration, and TT is xs:dayTimeDuration, then TV is derived from SV by removing the year and month components from SV.

The casting section talks without further explanation about &quot;removing components&quot; of the value, yet it&apos;s cited from a function spec that feels a need for a precise definition of what these components are.

The simplest solution seems to be to replace the text

Otherwise, the function returns an xs:integer representing the days component in the value of $arg. The result is obtained by casting $arg to an xs:dayTimeDuration (see 19.1.3 Casting to duration types) and then computing the days component as described in 8.1.2.3 Canonical representation.

with

Otherwise, the function returns an xs:integer representing the days component in the value of $arg. Given that the value space of xs:duration consists of ($months, $seconds) tuples, the result is ($seoonds idiv 86400). 

and similarly for the other X-from-duration() functions.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>112385</commentid>
    <comment_count>1</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2014-09-29 14:02:22 +0000</bug_when>
    <thetext>The change has been applied.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>