W3C home > Mailing lists > Public > public-xg-webid@w3.org > November 2011

Re: WebID-ISSUE-61 (xsd): xsd datatypes [ontologies]

From: Dominik Tomaszuk <ddooss@wp.pl>
Date: Sun, 20 Nov 2011 10:21:11 +0100
Message-ID: <4EC8C687.20608@wp.pl>
To: public-xg-webid@w3.org
CC: Henry Story <henry.story@bblfish.net>
On 19.11.2011 22:33, Dominik Tomaszuk wrote:
> But I propose more readable and full-validate datatype based on
> xsd:string and restrictions to hex and "-" sign:
Better code:
<rdfs:Datatype rdf:about="http://www.w3.org/ns/auth/cert#hex">
  <owl:onDatatype rdf:resource="http://www.w3.org/2001/XMLSchema#string" />
  <owl:withRestrictions>
   <rdf:Description>
    <rdf:first rdf:resource="http://www.w3.org/2001/XMLSchema#pattern" />
     <rdf:rest>
      <rdf:Description>
       <rdf:first 
rdf:datatype="http://www.w3.org/2001/XMLSchema#string">[0-9a-fA-F]{2}(-[0-9a-fA-F]{2})*</rdf:first>
       <rdf:rest 
rdf:resource="http://www.w3.org/1999/02/22-rdf-syntax-ns#nil" />
      </rdf:Description>
     </rdf:rest>
    </rdf:Description>
  </owl:withRestrictions>
</rdfs:Datatype>
And an example:
rsa:modulus "00-cb-24...91-a1"^^cert:hex
The advantage of this service is entailment [1].
XSD string with restrictions -> XSD string -> simple literal so:
SELECT ?v WHERE { ?v ?p "00-cb-24...91-a1" } may return query results.

[1] http://www.w3.org/TR/sparql11-entailment/

Best regards,
Dominik 'domel' Tomaszuk
Received on Sunday, 20 November 2011 09:21:48 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Sunday, 20 November 2011 09:21:50 GMT