- From: Stephen Buxton <Stephen.Buxton@oracle.com>
- Date: 17 Feb 04 10:34:52
- To: public-qt-comments@w3.org
- Cc:
SECTION 17.9: casting to duration types The second and third bullets describe how to cast between xdt:yearMonthDuration and xdt:dayTimeDuration. The second bullet tells how to cast "...a type derived from xs:duration..." (which might be xdt:dayTimeDuration) to xdt:yearMonthDuration. (The result is P0M). Similarly, the third bullet tells how to cast from xdt:dayTimeDuration to xdt:yearMonthDuration (the result is PT0S). This contradicts the table in section 17.1, which says that these casts are not possible. This could be fixed in several ways: 1. The description of the table in section 1 could be changed. Currently it says that "N indicates that there are no supported conversions". As worded, this sounds merely descriptive rather than prescriptive. The description could be changed to read "N indicates that the conversion results in an error" (though it would still be necessary to specify which error). 2. The second and third bullets could be reworded to specifically exclude xdt:yearMonthDuration and xdt:dayTimeDuration, respectively, and types derived from them. 3. The second and third bullets could be removed entirely. In that case casting to xdt:yearMonthDuration and xdt:dayTimeDuration would fall under the general guidelines in 17.4 "Casting within a branch of the type hierarchy", meaning that their pattern facets would have to be satisfied in order for the cat to succeed. 4. The second and third bullets could be reworded to raise an error if the components to be discarded are not already 0 in the source. Though this would still permit casting the zero values of xdt:yearMonthDuration and xdt:dayTimeDuration to one another, so the table would have to say that the conversions may succeed. - Steve B.
Received on Tuesday, 17 February 2004 13:34:56 UTC