Re: Datatypes (ISSUE-48)

On 10 Aug 2011, at 15:31, Richard Cyganiak wrote:

> One more question though: Which INTERVAL types use xsd:yearMonthDuration and which use xsd:dayTimeDuration?
That is yet on another part of the spec! And somewhat strange, I don't find a direct mapping for these. In section "9.5 Mapping SQL data types to XML Schema data types" the mapping is simply stated as:
	 1)  If SQLT is a year-month duration, then let DTYPE be xdt:yearMonthDuration.
	 2)  If SQLT is a day-time duration, then let DTYPE be xdt:dayTimeDuration.

Furthermore, Section "4.6.1 Introduction to datetimes and intervals" (and again in Section "6.1 <data type>") states: 
... An interval data type is described by an interval data type descriptor... 
... An interval data type descriptor contains:
	  An indication of whether the interval data type is a year-month interval or a day-time interval.

My reading from this is that it is a "property" of the interval datatype weather it is a "year-month duration" or a "day-time duration" and based on this you do the mapping to the appropriate XSD.


--
Nuno Lopes

Received on Wednesday, 10 August 2011 15:00:11 UTC