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

On 19 Nov 2011, at 22:33, Dominik Tomaszuk wrote:

> On 16.11.2011 17:19, WebID Incubator Group Issue Tracker wrote:
>>  - xsd:base64Binary
> -1 This datatype allows to incorrect values. For example:
> rsa:modulus "XX YY ZZ"^^xsd:base64Binary;
> Formally it is correct, but it isn''t hex value.

xsd:base64Binary is for base64 encoded data. You don't encode it as above, and it was never suggested here that you should. Just look at the examples on the  issue page http://www.w3.org/2005/Incubator/webid/track/issues/61


>>  - xsd:hexBinary
> +1
> But I propose more readable and full-validate datatype based on xsd:string and restrictions to hex and "-" sign:
> <rdfs:Datatype http://www.w3.org/ns/auth/cert#hex>
>  <label xml:lang="en">hexadecimal</label>
>  <xsd:base rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
>  <xsd:pattern rdf:datatype="http://www.w3.org/2001/XMLSchema#string">[0-9a-fA-F]{2}(-[0-9a-fA-F]{2})*</xsd:pattern>
> </rdfs:Datatype>
> An example:
> rsa:modulus "00-cb-24...91-a1"""^^cert:hex
> As you can see it is modification of cert#hex, but now it is defined strictly and based on well-known xsd:string.

And what does that bring you? Now you can't implement type inferencing easily in your rdf engine. With cert:hex or xsd:integer you
can have the rdf engine automatically convert any way of representing a cert:hex string into a BigInteger, and do immediate comparison using an ASK query.   With strings you would have to do a lot more messing around in code.

Theoretically at least. I have not researched if Jena or Seame or other Java engines allow me to do that. But they should.

Henry

> 
> Best regards,
> Dominik 'domel' Tomaszuk

Social Web Architect
http://bblfish.net/

Received on Sunday, 20 November 2011 09:28:39 UTC