[foaf-protocols] WebID Protocol / WOT Ontology

Toby Inkster tai at g5n.co.uk
Mon Sep 20 08:54:49 CEST 2010

On Sun, 19 Sep 2010 14:50:38 +0200
Melvin Carvalho <melvincarvalho at gmail.com> wrote:

> User wot:hasKey <PubKey> *

WebID implementations certainly shouldn't support wot:hasKey. The
rdfs:range of wot:hasKey is wot:PubKey, which is specifically defined
as a PGP/GPG key.

The inverse of wot:hasKey is wot:identity, which IIRC cert:identity was
deliberately named in homage to.

Would cert:hasKey be more intuitive than cert:identity? Perhaps in
RDF/XML and Turtle it would, as they would allow keys to be
written as nested bnodes thusly:

	  a foaf:Person ;
	  foaf:name "Joe Bloggs" ;
	  cert:hasKey [ ... ] .

For other notations such as N3 and RDFa, cert:identity is adequate, as
they offer their own mechanisms for reversing the direction of a
predicate - @rev in RDFa and "is...of" in N3:

	  a foaf:Person ;
	  foaf:name "Joe Bloggs" ;
	  is cert:identity of [ ... ] .

The three routes forward would be:

1. To keep the status quo (cert:identity);
2. To switch to cert:hasKey; or
3. To allow both/either.

To provide backwards compatibility, if we took option #2, realistically
implementations would need to head down the same route as #3 - they'd
need to support both.

So the choice comes down to keeping things as they are, or making
implementations support cert:identity and its inverse too. Personally I
think we should keep the status quo - defining inverse properties is
evil. Making things flexible for publishers makes them devilish for

If you have to write a query where one predicate could be given in
either or both directions, it's not too bad - a UNION will do the
trick. But when there are two predicates that are inversible, that's
four combinations; three predicates, eight combinations; etc - it's a
2^n thing. You can rewrite your SPARQL query to make it tolerable, but
underneath, the query engine still has more work to do.

So in my experience, defining inverses for properties is an
anti-pattern. I did it myself in some early vocabularies, before I
learnt the error of my ways.

Toby A Inkster
<mailto:mail at tobyinkster.co.uk>

More information about the foaf-protocols mailing list