ISSUE-48 (was: Re: ACTION-141) Create a SQL/XSD data dataype mapping

On 2 Aug 2011, at 17:39, Nuno Lopes wrote:
>> Is xsd:date for TIME a typo?
> 
> Yes, fixed.

Ok, cheers.

>> How exactly should I read the “or”/“and” in the XSD column?
> 
> The spec further defines an algorithm for this mapping, for instance, the "or" for FLOAT is dependent on the precision of the datatype in the implementation: under 24 bits is an xs:float otherwise is an xs:double.  Not sure if all cases are this simple, I will check. 

Ok. Would be great if this were documented in the wiki page as well. Note that RDF doesn't allow the expression of facets on XSD datatypes, so I think we can more or less ignore that part.

>> For things like boolean and dates and times and durations, how exactly is the syntactic correspondence for the values? I mean, a normal SQL datetime literal isn't in the right lexical form for an XSD datetime literal. (I think there's a section in Part 14 about that, something about "data values"?)
> 
> Regarding the lexical form of dates, times, and durations the facet is used to restrict the lexical value of the XSD datatype and the algorithm (which I did not look into in detail yet) seems to define a regular expression for the conversion from the SQL datatype to a valid form of the XSD datatype.  

What we'll have to explain in the spec is basically: Given an input SQL data value v of SQL datatype ST, what transformation do we have to do on the value in order to derive a lexical form l of XSD datatype XT?

We can omit discussing the transformation for any type where the default CAST to string behaviour doesn't produce the right result.

Best,
Richard


>>> [1] http://www.w3.org/2001/sw/rdb2rdf/wiki/Mapping_SQL_datatypes_to_XML_Schema_datatypes

Received on Tuesday, 2 August 2011 20:10:04 UTC