[foaf-dev] Proposal: deprecate pastProject and currentProject

Richard Cyganiak richard at cyganiak.de
Mon Dec 14 19:53:44 CET 2009


On 14 Dec 2009, at 11:43, Dan Brickley wrote:
> On Mon, Dec 14, 2009 at 12:20 PM, Richard Cyganiak <richard at cyganiak.de 
> > wrote:
>> On 13 Dec 2009, at 21:12, Dan Brickley wrote:
>>>
>>> There's a risk with this stuff of building parallel sets of
>>> properties; those that link to pages and those that link to the
>>> primary topics of those pages. RDFa biases us towards the former,
>>> modelling clarity towards the latters.
>>
>> I would almost go as far as calling the former (workplaceHomepage,
>> schoolHomepage) an anti-pattern.
>
> Strong words! Remember we're in an environment where people complain
> about every little bit of perceived complexity.

Yes, true. And I don't really expect consensus on this.

I think that a bit of extra markup adds less complexity than a number  
of extra properties, because the latter has so much potential for  
confusion and accidental misuse. As soon as someone wants to express  
the name or the location of the school, rather than just the homepage,  
the current way of doing things fails. If the school doesn't have a  
homepage, because it was closed in the mid-90s, the current way of  
doing things fails. Hence there will be demand for a more detailed  
vocabulary.

(One might reply that there are *always* cases where a more detailed  
vocabulary is needed, for example, what if I want to say exactly which  
years I attended the school. I have no good response to that. But I  
think that “skipping” over an important entity that the page talks  
about, like the school, is trying to simplify things too much.)

>> I don't think that RDFa biases us towards
>> them. Adding the extra @typeof is not particularly hard, and  
>> provides an
>> obvious way of attaching a foaf:name to the entity as well.
>
> Care to draft some markup snippets?  Here is some fresh HTML markup,
> autobiographical, true and handwritten using real Web sites.
>
> 1a.
> <p>
> My name is Dan Brickley and I spent much of the '80s at <a
> href="http://www.westergate.w-sussex.sch.uk/">Westergate School</a>.
> Before that I was at <a
> href="http://www.eastergate.w-sussex.sch.uk/">Eastergate</a>, where we
> moved in 1978 from <a
> href="http://en.wikipedia.org/wiki/Hamsey_Green">Hamsey Green</a> near
> <a href="http://en.wikipedia.org/wiki/Croydon">Croydon</a> where I
> attended the <a href="http://hginfant.schoolwebbuilder.co.uk/">infants
> school</a> I guess from late 1976 to summer 1978. Before that, it's
> all a blur :)
> </p>
>
> 2a. Same thing with minor RDFa FOAF
> <p
> about="http://danbri.org/foaf.rdf#danbri" typeof="foaf:Person"
> xmlns:foaf="http://xmlns.com/foaf/0.1/">
> My name is <span property="foaf:name">Dan Brickley</span> and I spent
> much of the '80s at <a rel="foaf:schoolHomepage"
> href="http://www.westergate.w-sussex.sch.uk/">Westergate School</a>.
> Before that I was at <a rel="foaf:schoolHomepage"
> href="http://www.eastergate.w-sussex.sch.uk/">Eastergate</a>, where we
> moved in 1978 from <a
> href="http://en.wikipedia.org/wiki/Hamsey_Green">Hamsey Green</a> near
> <a href="http://en.wikipedia.org/wiki/Croydon">Croydon</a> where I
> attended the <a rel="foaf:schoolHomepage"
> href="http://hginfant.schoolwebbuilder.co.uk/">infants school</a> I
> guess from late 1976 to summer 1978. Before that, it's all a blur :)
> </p>
>
> Using http://www.w3.org/2007/08/pyRdfa/ I get
>  <foaf:Person rdf:about="http://danbri.org/foaf.rdf#danbri">
>    <foaf:name>Dan Brickley</foaf:name>
>    <foaf:schoolHomepage rdf:resource="http://www.eastergate.w-sussex.sch.uk/ 
> "/>
>    <foaf:schoolHomepage
> rdf:resource="http://hginfant.schoolwebbuilder.co.uk/"/>
>    <foaf:schoolHomepage rdf:resource="http://www.westergate.w-sussex.sch.uk/ 
> "/>
>  </foaf:Person>
>
> 3a. Richard's version - entity rather than page centric?

Here's my RDFa version:

<p about="http://danbri.org/foaf.rdf#danbri" typeof="foaf:Person"
xmlns:foaf="http://xmlns.com/foaf/0.1/">
My name is Dan Brickley and I spent much of the '80s at
<span rel="foaf:attended"><a
typeof="foaf:School" rel="foaf:homepage" property="foaf:name" href="http://www.westergate.w-sussex.sch.uk/ 
">Westergate School</a></span>.
Before that I was at
<span rel="foaf:attended"><a
typeof="foaf:School" rel="foaf:homepage" property="foaf:name" href="http://www.eastergate.w-sussex.sch.uk/ 
">Eastergate</a></span>, where we
moved in 1978 from <a
href="http://en.wikipedia.org/wiki/Hamsey_Green">Hamsey Green</a> near
<a href="http://en.wikipedia.org/wiki/Croydon">Croydon</a> where I
attended the
<span rel="foaf:attended"><a typeof="foaf:School" rel="foaf:homepage"  
property="foaf:name" href="http:// 
hginfant.schoolwebbuilder.co.uk/">infants
school</a></span> I guess from late 1976 to summer 1978. Before that,  
it's
all a blur :)
</p>

I made up foaf:attended and foaf:School terms. I inserted an extra  
<span> around each of the school links in order to have a place for  
the foaf:attended property. If the schools had been a bullet-point  
list, I would have put the @rel on the <ul> instead. And here are the  
triples:

   <foaf:Person rdf:about="http://danbri.org/foaf.rdf#danbri">
     <foaf:attended>
       <foaf:School>
         <foaf:homepage rdf:resource="http://www.westergate.w-sussex.sch.uk/ 
"/>
         <foaf:name>Westergate School</foaf:name>
       </foaf:School>
     </foaf:attended>
     <foaf:attended>
       <foaf:School>
         <foaf:homepage rdf:resource="http://www.eastergate.w-sussex.sch.uk/ 
"/>
         <foaf:name>Eastergate</foaf:name>
       </foaf:School>
     </foaf:attended>
     <foaf:attended>
       <foaf:School>
         <foaf:homepage rdf:resource="http://hginfant.schoolwebbuilder.co.uk/ 
"/>
         <foaf:name>infants
school</foaf:name>
       </foaf:School>
     </foaf:attended>
   </foaf:Person>

So the extra stuff in the HTML markup buys me a dedicated resource for  
each school, as well as a foaf:name and rdf:type triple for each school.

> Can you post RDFa and triples here. Non-scary HTML is a goal, ie.
> stuff that people can write without thinking much about RDF.

Well, scariness is subjective of course. I don't think the HTML above  
is rocket science.

>>> Reminds me of the XFN mapping
>>> discussion too.
>>>
>>> workplaceHomepage, schoolHomepage are in former category;  
>>> pastProject,
>>> currentProject too on my preferred reading;
>>
>> I'm checking the spec and realising that currentProject indeed  
>> "relates a
>> person to a document". I could have sworn that its range was  
>> foaf:Project.
>> That's what I was thinking all those years anyway, and that's how  
>> I've been
>> using it.
>
> Not suprising. Generally we've had 'page' in the name of properties
> that point to pages/docs.

+1 to that practice.

> And it might be that things were changed or
> clarified some years ago. It's all in the public SVN if you care to
> dig.
>
>> What's the basis for the assertion in the spec that "in practice"  
>> it's used
>> to refer to pages?
>
> In practice it's barely used, but the spec says it's for pages.
>
> http://www.sindice.com/search?q=*+%3Chttp%3A%2F%2Fxmlns.com%2Ffoaf%2F0.1%2FcurrentProject%3E+*&qt=advanced
>
> (finds 701 occurances)
>
> ... Advogato seems the main not-by-hand publisher, and they link to
> project homepages.

One publisher means that you only need to convince one guy to  
radically change the numbers.

> If there was a trivial way to always go from a page, eg.
> http:/foo.example.org/ to a URI for the primary topic of that page,
> life might be easier in several ways.

An intermediate blank node is not trivial, but easy enough for me.

If someone understands the markup I've posted above, then adding  
another rdf:about with a URI for the school itself is not much  
additional complexity to swallow.

I'm sceptical about thing-described-by, the “trailing hash” convention  
and similar techniques. For them to work, it's required that different  
people make the same guess as to what's the primary topic of some  
page. That's brittle. If the place you want to link to has only a web  
page but no URI, then it's better to use a web page idiom (e.g. blank  
node + foaf:homepage).

Best,
Richard



>
> http://larry.masinter.net/duri.html has been around for a while, so
> tdb:http://foo.example.org/ is one option. And not particularly
> unsemantic since the html page can always contain RDFa.
>
> Another idea is to find some generalisation of the
> http://foo.eample.org/#concept pattern we've seen around, where we
> want a symbolic name for something that is not an anchor in the HTML
> sense, but is the URI for the thing the page is talking about. I have
> been wondering about chars that are disallowed as HTML anchor names,
> to give us a cleaner namespace with no chance of clashes. Perhaps
> http://foo.example.org/#! could be a common prefix and
> http://foo.example.org/#!! a convention for 'the thing described by
> this document'. It doesn't seem used at the moment for anything else.
>
> I'm a bit worried we'll end up doubling the number of links, since
> whenever we mention some other document in an HTML hyperlink, we'll
> have to mention the thing it is about as well. So perhaps some
> conventions for hopping between the document view and the thing view
> could be helpful here...
>
> cheers,
>
> Dan



More information about the foaf-dev mailing list