- From: Dominik Tomaszuk <ddooss@wp.pl>
- Date: Sun, 20 Nov 2011 10:21:11 +0100
- 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 UTC