Re: RDFa + RDF/XML Considered Harmful? (was RE: Ordnance Survey data as Linked Data)

(Public notice: anyone sick of document-versus-thing debates and 303  
redirects may safely skip this message! ;-)

On 14 Jul 2008, at 17:38, Mark Birbeck wrote:
> Let's flip the whole thing on its head, to begin with. Let's say that
> our RDF/XML document is referring to a car:
>
>  <rdf:Description rdf:about="http://cars.org/123456">
>    <dc:creator>BMW</dc:creator>
>    <dc:date>2008-07-14</dc:date>
>    ...
>  </rdf:Description>
>
> That's fine, and we could have hundreds of cars in our RDF/XML
> document. However, let's stick to one car, and serve it from the same
> URL as its subject.

HTTP has an axiom: If you serve something at a URI, then the URI  
identifies a document.

All the troubles you describe below are caused by your attempt to  
publish the RDF/XML at the car's URI. This triggers the axiom and  
turns the thing into a document. So now you have a resource that  
evidently is a car and a document. If that causes problems, then DON'T  
DO THAT.

As per [1], either use a hash URI like <cars.org/123456#it> for the  
car, or configure a 303 redirect from <cars.org/123456> to, say,  
<cars.org/123456.rdf> and serve the RDF/XML there.

Note that if you follow this advice and publish the RDF/XML at  
<cars.org/123456.rdf>, then it's perfectly fine to add some extra  
triples, such as

     <cars.org/123456.rdf> dc:publisher "Richard" .
     <cars.org/123456.rdf> foaf:primaryTopic <cars.org/123456> .

So: Yes, RDF/XML documents can talk about themselves.

But: Usually, in an RDF/XML document, you want to talk about  
*something else* than the document itself, so give a different URI to  
that other thing! That's what hash URIs and 303 URIs are for.

Best,
Richard

[1] http://www.w3.org/TR/cooluris/


> As you rightly say we can abbreviate the @about to
> refer to the 'current document':
>
> At http://cars.org/123456:
>
>  <rdf:Description rdf:about="">
>    <dc:creator>BMW</dc:creator>
>    <dc:date>2008-07-14</dc:date>
>    ...
>  </rdf:Description>
>
> Hopefully that is still so far so good. Now let's add your publisher
> information:
>
>
> At http://cars.org/123456:
>
>  <rdf:Description rdf:about="">
>    <dc:creator>BMW</dc:creator>
>    <dc:publisher>Richard</dc:publisher>
>    <dc:date>2008-07-14</dc:date>
>    ...
>  </rdf:Description>
>
> Why does dc:publisher suddenly apply to the document and not the car?
>
> If it does, how did you (or your software) know to apply it that way?
>
> And even if you knew that dc:publisher applies to documents, (a) how
> do you know to apply it to the RDF/XML document, and not
> <http://cars.org/123456> (which might be a document), and (b) even if
> you can resolve that, how would you decide what to apply the dc:date
> to? Should it apply to the car or to the RDF/XML document?
>
> For these reasons I have always viewed RDF/XML as 'scaffolding' that
> holds triples which can be about *anything* you like...anything, that
> is, except itself. :)
>
> Regards,
>
> Mark
>
> -- 
> Mark Birbeck, webBackplane
>
> mark.birbeck@webBackplane.com
>
> http://webBackplane.com/mark-birbeck
>
> webBackplane is a trading name of Backplane Ltd. (company number
> 05972288, registered office: 2nd Floor, 69/85 Tabernacle Street,
> London, EC2A 4RR)

Received on Monday, 14 July 2008 19:34:59 UTC