- From: <bugzilla@wiggum.w3.org>
- Date: Mon, 27 Feb 2006 07:39:00 +0000
- To: public-qt-comments@w3.org
- Cc:
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