W3C home > Mailing lists > Public > public-qt-comments@w3.org > February 2006

[Bug 2944] [FO] 10.5 fn:years-from-duration etc have wrong argument types

From: <bugzilla@wiggum.w3.org>
Date: Mon, 27 Feb 2006 07:39:00 +0000
To: public-qt-comments@w3.org
Cc:
Message-Id: <E1FDcyC-0000NV-8F@wiggum.w3.org>

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

           Summary: [FO] 10.5 fn:years-from-duration etc have wrong argument
                    types
           Product: XPath / XQuery / XSLT
           Version: Last Call drafts
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Functions and Operators
        AssignedTo: ashok.malhotra@oracle.com
        ReportedBy: per@bothner.com
         QAContact: public-qt-comments@w3.org


The function fn:years-from-duration is specified to have signature:
  fn:years-from-duration($arg as xdt:yearMonthDuration?) as xs:integer?
This means there is no way to extract the years component
from say xs:duration("P20Y15M10D").

The signature should instead be:
fn:years-from-duration($arg as xs:duration?) as xs:integer?

But you may ask what if the actual argument is an
xs:dayTimeDuration?  In that case the function returns 0.

Likewise for:
fn:months-from-duration
fn:days-from-duration
fn:hours-from-duration
fn:minutes-from-duration
fn:seconds-from-duration
These all should take ($arg as xs:duration?).
Received on Monday, 27 February 2006 07:39:06 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 16:57:10 UTC