Re: Datatypes (ISSUE-48)

Ivan,

On 10 Aug 2011, at 11:59, Ivan Herman wrote:
> So here is the question: should we use XML schema based datatypes as the 'target' datatype, or rather OWL 2 based datatypes?

I intent to propose spec text that would generate XSD-typed literals.

So far I haven't actually seen anyone propose or advocate mapping to faceted OWL2 datatypes.

Best,
Richard


> 
> I believe the type you described below would be:
> 
> <newType> a rdfs:Datatype ;
>   owl:onDatatype xsd:string ;
>   owl:withRestrictions (
>     [ xsd:pattern "\p{Nd}{4}-\p{Nd}{2}-\p{Nd}{2}" ]
>   ) .
> 
> It is not overly pretty either (neither is the XML Schema based) but the question is which one could be used more efficiently in practice. I may be mistaken, but I do not know of any RDF environment that would interpret derived datatypes defined with XML Schemas. At least there are OWL environments that do, however (eg, they can check range restrictions based on literal values, stuff like that).
> 
> Ivan
> 
> 
> On Aug 10, 2011, at 12:35 , Nuno Lopes wrote:
> 
>> Hi Richard,
>> 
>> I added to the Wiki an explanation for the "or" mapping, most of them are left up to the implementation. Regarding the boolean type there is no mention and it seems to be mapped directly.  As for the dates and durations, the lexical values are restricted by the "xs:pattern" facet as I mentioned. For example the DATE SQL type is mapped to the XSD type:
>> 
>> <xs:simpleType>
>> ANN
>> <xs:restriction base="xs:date">
>>   <xs:pattern value="\p{Nd}{4}-\p{Nd}{2}-\p{Nd}{2}"/>
>> </xs:restriction>
>> </xs:simpleType>
>> 
>> where ANN may indicate the original SQL datatype (implementation defined).  I'll add this example to the wiki.
>> 
>> Did I miss some other question?
>> 
>> Cheers,
>> --
>> Nuno Lopes
>> 
>> 
>> 
>> On 9 Aug 2011, at 19:03, Richard Cyganiak wrote:
>> 
>>> Hi Nuno,
>>> 
>>> I had another look at the wiki page:
>>> http://www.w3.org/2001/sw/rdb2rdf/wiki/Mapping_SQL_datatypes_to_XML_Schema_datatypes
>>> 
>>> Ok, this answers what we ought to do with user-defined and constructed types.
>>> 
>>> There are still a couple of questions open from here:
>>> http://lists.w3.org/Archives/Public/public-rdb2rdf-wg/2011Aug/0017.html
>>> 
>>> Maybe you could comment on these?
>>> 
>>> Cheers,
>>> Richard
>> 
>> 
> 
> 
> ----
> Ivan Herman, W3C Semantic Web Activity Lead
> Home: http://www.w3.org/People/Ivan/
> mobile: +31-641044153
> PGP Key: http://www.ivan-herman.net/pgpkey.html
> FOAF: http://www.ivan-herman.net/foaf.rdf
> 
> 
> 
> 
> 
> 

Received on Wednesday, 10 August 2011 11:24:52 UTC