- From: Brad Cox <bradjcox@gmail.com>
- Date: Mon, 13 Jul 2009 07:23:03 -0400
- To: Bijan Parsia <bparsia@cs.man.ac.uk>
- Cc: Brad Cox <bradjcox@gmail.com>, public-owl-dev@w3.org
Thanks Bijan. That leaves just one puzzler. Why is it foaf:imaginaryFriend not foaf#imaginaryFriend, and which should I use for my own properties from my core: (core#?) namespace? I've been doing it like this, confused by when to use core: vs core# <rdf:Description rdf:about="#SomeModelElement"> <rdf:type rdf:resource="http://<host>/ontology/2009/07/ core#SomeElementClass"/> <core:isElementOf rdf:resource="#SomeModel"/> <core:hasStakeholder rdf:resource="#SomeStakeholder"/> <rdfs:comment>Some Comment</rdfs:comment> </rdf:Description> Seems to work. But how to explain why to newcomers? I couldn't. PS: One other. I thought rdf:ID="SomeName" was *THE* way to *define* a new item that you *know* doesn't exist and rdf:about="#SomeName" was *THE* way to reference or extend one that might not yet exist. Why there's about= and resource=, I've never understood. On Jul 13, 2009, at 5:31 AM, Bijan Parsia wrote: > On 12 Jul 2009, at 22:19, Brad Cox wrote: > >> Could someone please recommend a concise reference for when (and >> why) to use the various reference/dereferencing options >> (rdf:ID, rdf:about, rdf:resource, others?). Also namespaces (when >> to use foo:bar vs foo#bar vs &foo;bar and so forth). I've searched >> high and low and am constantly confused by the proliferation of >> twisty passages. >> >> I've worked some of these out experimentally but that broke down >> when I divided a large ontology into separate files. I'm really >> hoping for something like a best practices but will take whatevers >> available. > > > I don't know of anything extant except what's in my head, so I > hereby transcribe that into this email :) > > Underlying principle: Avoid distinctions in syntax that don't show > up in the model, unless the syntax forces you (or it's convenient). > > From this, the Golden Rule: Don't ever use rdf:ID. > > (rdf:ID is confusing -- even deceptive -- and not very robust) > > Other underlying principle: Be consistent. > > The simplest thing to do is use rdf:about everywhere. That leads to > slightly more verbose RDF/XML, e.g., > > A: <rdf:Description rdf:about="#sheevah"> > <foaf:imaginaryFriend> > <rdf:Description rdf:about="#bijan"/> > </foaf:imaginaryFriend> > <rdf:Description> > > instead of: > B: <rdf:Description rdf:about="#sheevah"> > <foaf:imaginaryFriend rdf:resource="#bijan"/> > <rdf:Description> > > But A is robust (e.g., it's straightforward to add more nesting) and > simple. It can be cleaner if you have a one off rdf:type, e.g., > > A' <foaf:Person rdf:about="#sheevah"> > <foaf:imaginaryFriend> > <foaf:Person rdf:about="#bijan"/> > </foaf:imaginaryFriend> > <foaf:Person> > > vs. > > B' <foaf:Person rdf:about="#sheevah"> > <foaf:imaginaryFriend rdf:resource="#bijan"/> > <foaf:Person> > <foaf:Person rdf:about="#bijan"/> > > I personally use the rule: rdf:about everywhere except in a terminal > object node where I use rdf:resource. Basically, "rdf:resource > everywhere I can, rdf:about otherwise". > > # vs. /, well, basically "be consistent". Either is fine > semantically, # is rather more common, so # is simpler. # *can* > cause problems if you are in a rare situtation where people are > dereferencing a term (ewww...don't do that) and not caching...they > can hammer your server. From the client perspective, it can force > them to download far more than they needed. Contrariwise, you end up > in the wordnet situation with a slew of microontologies. Bleah. > > &foo;bar is a pure syntax issue and I would use it only when forced. > You are forced when you have to put uris in attribute content and > they are not from your base (thus can't be relative). It's *much* > better to use entities than to try to scatter bases throughout your > document. The most common in owl is &xsd; since you need that for > the brute syntax. > > You might also consider the forthcoming OWL/XML with has a somewhat > simpler story wrt all this. Sorta. Mostly. :) Basically, you can use > a curie variant throughout. > > Cheers, > Bijan. > > Cheers, > Bijan. >
Received on Monday, 13 July 2009 11:23:40 UTC