W3C home > Mailing lists > Public > public-rdfa@w3.org > May 2009

Re: RDFa in <head>

From: Mark Birbeck <mark.birbeck@webbackplane.com>
Date: Tue, 5 May 2009 10:53:42 +0100
Message-ID: <ed77aa9f0905050253wc329fe6wf4ef6d6d1b15bc18@mail.gmail.com>
To: Stephane Corlosquet <stephane.corlosquet@deri.org>
Cc: RDFa <public-rdf-in-xhtml-tf@w3.org>, public-rdfa@w3.org
Hi Stéphane,

> I've noticed some RDFa-enabled websites which output all the RDFa in a bunch
> of <meta> tags in the <head> of the HTML documents, see for example
> http://www.slideshare.net/danbri/danbri-foaf-talk-social-web-camp-www2009
>
> While the extracted RDF is valid and informative, is that considered best
> practice? (as opposed to inline RDFa in the body of the document).

I would say it depends on what you are trying to achieve, but I'd
certainly encourage putting the information inline in the body, where
possible, and can think of at least two benefits to doing so; more
opportunities to enrich the UI, and a more natural distinction between
the web-page, and the topic of the web-page.


ENRICHING THE UI

As you rightly point out, the SlideShare pages have information such
as dc:creator in the head of the document. By placing it there, valid
triples are still generated when parsed by an RDFa parser, but since
the original markup is not visible to the user, there isn't much else
that can be done when it comes to enriching the UI.

For example, halfway down the page is a thumbnail representing Dan,
and his user name ("danbri"). This would be an ideal place to put the
dc:creator information, since a user agent could then do something
clever with the display of Dan's name or avatar, to indicate that he
created the slideshow.


WEB-PAGES AND THEIR TOPICS

There is another weakness with the SlideShare example, which is that
the URL for the web-page is being used to identify the slideshow
itself, which is a common mistake in RDF.

Technically speaking the creator of the web-page is not 'Dan
Brickley', it's SlideShare; Dan created the slides which are hosted on
the page created by SlideShare, and Dan would still have created those
slides if he moved them to a new web-site.

This is one of those things that always proves a little ephemeral, but
one easy way to ensure the distinction is to place information in the
head element that concerns the web-page itself (publisher =
SlideShare, created on Thurdsday, etc.) and then put information about
the 'thing that the document is about' in the body (in this case, a
slideshow by Dan), with an additional identifier. For example:

  <html>
    <head>
      <title>Danbri FOAF talk, Social Web Camp, WWW2009</title>
      <meta property="dc:creator" content="SlideShare" />
    </head>
    <body>
      <div rel="media:presentation" resource="http://static.slides...-www2009">
        <div>Dimensions:
          <span property="media:width">425</span>
          x
          <span property="media:height">355</span>
        </div>
        <div>Creator:
          <span property="dc:creator">danbri</span>
        </div>
      </div>
    </body>
  </html>

(Although I'm not keen on the use of media:presentation as a
predicate, I've used it here because that's how SlideShare is doing
it, and it doesn't really affect what I'm trying to explain.)

Note a few things here. First, that the URL for the slideshow is
different to the URL for the page.

Second, all of the properties like width, height, creator, and so on,
which are features of the presentation and not the web-page, are now
correctly added to the resource of the presentation (because @resource
sets the subject for media:width, etc.)

Third, it's still easy to add properties of the document itself, such
as dc:publisher, dc:subject, etc., in the head element.

And finally, there can be as many of these div blocks as we like in a
page, each with a separate @about value. This makes it easy for a page
to contain many things that it is 'about', such as a page full of
slideshows, images, videos, etc., or even a mix of different
documents.


By the way, the reason I've answered in some detail is because I know
that lying behind your question is a more general discussion about how
Drupal should support RDFa, and obviously I'm trying to make the case
that we'll get far more from Drupal and RDFa if we avoid the
SlideShare approach! ;)

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 Tuesday, 5 May 2009 09:54:24 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 17:04:43 UTC