[foaf-protocols] Debugging results

Sarven Capadisli info at csarven.ca
Mon Aug 2 16:23:59 CEST 2010


On Sun, 2010-08-01 at 23:32 +0200, Henry Story wrote:
> On 1 Aug 2010, at 21:33, Nathan wrote:
> 
> > Hi All,
> > 
> > I checked to see what's wrong with my little test script @ 
> > https://data.fm/ and here's the results:
> > 
> > csarven
> > returns: RDF/XML
> > uses cert:Integer for exponent and I was only checking for 'cert:int'
> > note: can we specify only one please (why have two??)
> 
> That is because the ontology does not define cert:Integer to be a property. It defined cert:decimal, but that has been deprecated.
> 
> We are trying to move entirely over to using dataytypes.
> I created a cert:int datatype to match the cert:hex datatype. 
> I could have turned cert:decimal into a datatype too, but the problem is that
> decimal in most people's minds does not make them think of base10 numbers, but rather of floating point numbers.
> 
> If you look at the ontology using  you will find cert:int defined as
> 
> 
> $ curl -H "Accept: text/n3" http://www.w3.org/ns/auth/cert
> 
> [snip]
> 
> :int a rdfs:Datatype;
>    vs:term_status "unstable";
>    owl:equivalentClass xsd:nonNegativeInteger;
>    skos:editorialNote """
>       We may decide to make it easier to write integers than what xsd:integer provides, if needed.
>    """@en;
>    rdfs:comment """
>       A positive integer in base 10 notation.
>       xsd:nonNegativeInteger could be used, but is a bit long to write, and may be too strictly defined. 
>       This is here to provice a pair with cert:hex, to avoid needing to import a new namespace, and to give a bit more flexibility in the future.
>    """@en .
> 

If I'm not mistaken:

$ curl -H "Accept: text/n3" http://www.w3.org/ns/auth/rsa

[snip]

:public_exponent a rdf:Property;
   vs:term_status "unstable";
   rdfs:comment """
       The exponent used to encrypt the message. Number chosen between
       1 and the totient(p*q). Often named 'e' .
    """;
   rdfs:domain :RSAPublicKey;
   rdfs:range cert:Integer .

and

$ curl -H "Accept: application/rdf+xml" http://www.w3.org/ns/auth/rsa

    <rdf:Property rdf:about="rsa#public_exponent">
        <comment>
       The exponent used to encrypt the message. Number chosen between
       1 and the totient(p*q). Often named 'e' .
    </comment>
        <domain rdf:resource="rsa#RSAPublicKey"/>int a rdfs:Datatype;
   vs:term_status "unstable";
   owl:equivalentClass xsd:nonNegativeInteger;
   skos:editorialNote """
      We may decide to make it easier to write integers than what
xsd:integer provides, if needed.
   """@en;
   rdfs:comment """
      A positive integer in base 10 notation.
      xsd:nonNegativeInteger could be used, but is a bit long to write,
and may be too strictly defined. 
      This is here to provice a pair with cert:hex, to avoid needing to
import a new namespace, and to give a bit more flexibility in the
future.
   """@en .

        <range rdf:resource="cert#Integer"/>
        <vs:term_status>unstable</vs:term_status>
    </rdf:Property>

both have range cert#Integer.

The n3 and rdfxml serializations for http://www.w3.org/ns/auth/cert are
not equivalent as;

$ curl -H "Accept: text/n3" http://www.w3.org/ns/auth/cert

uses :int

[snip]

:int a rdfs:Datatype;
   vs:term_status "unstable";
   owl:equivalentClass xsd:nonNegativeInteger;
   skos:editorialNote """
      We may decide to make it easier to write integers than what
xsd:integer provides, if needed.
   """@en;
   rdfs:comment """
      A positive integer in base 10 notation.
      xsd:nonNegativeInteger could be used, but is a bit long to write,
and may be too strictly defined. 
      This is here to provice a pair with cert:hex, to avoid needing to
import a new namespace, and to give a bit more flexibility in the
future.
   """@en .

however,

$ curl -H "Accept: application/rdf+xml" http://www.w3.org/ns/auth/cert

uses :Integer 

[snip]

    <owl:Class rdf:about="cert#Integer">
        <comment> 
    The class of all integers, however large they be. 
    This should probably be defined in another ontology.
    Different representations for each can be defined via relations to
string
    literals. 
    This is equivalent to the values of xsd:integer literals, except
that we don't want to be locked into having to use a particular literal
notation. Some of these integers are so long it is much better to
express them in hexadecimal format.
    </comment>
        <vs:term_status>unstable</vs:term_status>
    </owl:Class>

They appear to be different documents as opposed to same source document
with different serializations. 

So, initially I went with rsa's range for public_exponent and what cert
had for rdfxml.

I think http://www.w3.org/ns/auth/cert 's n3 serialization should be
updated to reflect http://www.w3.org/ns/auth/rsa 's range for
public_exponent.

If I'm mistaken or overlooking something, I'd like to learn why. Thanks.

-Sarven



More information about the foaf-protocols mailing list