W3C home > Mailing lists > Public > public-lod@w3.org > January 2012

Re: RDFa in HTML5

From: Augusto Herrmann <augusto.herrmann@gmail.com>
Date: Mon, 2 Jan 2012 09:43:59 -0200
Message-ID: <CAOdmboteTTuO_R_cJbvq9-CBLD+f5FrzigAQ+iDnRuAf4DydiQ@mail.gmail.com>
To: public-lod@w3.org
Hi!

We've recently added some examples on how to mark up web pages using
our controlled vocabulary for e-gov (Vocabulário Controlado de Governo
Eletrônico - VCGE). The examples include HTML5 + RDFa 1.1, HTML5 +
RDFa Lite 1.1 and HTML5 + Microdata, and we'd like to check if it's
correct.

For instance, if a webpage is about Education, it would be marked up like this:

<!DOCTYPE html>
<html>
<head>
  <title>Página sobre Educação</title>
  <meta property="http://purl.org/dc/terms/subject"
content="http://vocab.e.gov.br/2011/03/vcge#educacao" />
  ...
</head>
  ...
</html>

Since there's no "about" attribute to set the subject in this example,
it is assumed to be the current document. Thus, the following triple
would be generated:

<> dcterms:subject <http://vocab.e.gov.br/2011/03/vcge#educacao> .

In RDFa Lite, we followed the example set in its current draft
document by using schema.org:

<!DOCTYPE html>
<html>
<head>
  <title>Página sobre Educação</title>
  <meta vocab="http://schema.org/" property="about"
content="http://vocab.e.gov.br/2011/03/vcge#educacao" />
  ...
</head>
  ...
</html>

I think this would generate the following triple:

<> <http://schema.org/about> <http://vocab.e.gov.br/2011/03/vcge#educacao> ..

Finally, using Microdata, we can't just assume the current document is
the subject like in RDFa, and the itemscope has to be set explicitly;
The empty itemid would indicate the current document:

<!DOCTYPE html>
<html>
<head itemscope itemtype="http://schema.org/WebPage" itemid="">
  <title>Página sobre Educação</title>
  <meta itemscope itemprop="about"
content="http://vocab.e.gov.br/2011/03/vcge#educacao" />
  ...
</head>
  ...
</html>

I checked the URL with Google Rich Snippets and it did indeed find the
Microdata item like this (the page is marked up using both RDFa 1.1
and Microdata):

Item
http://schema.org/about = http://vocab.e.gov.br/2011/03/vcge#esquema

You can check how our controlled vocabulary is presented as well as
the examples in the following URL: http://vocab.e.gov.br/2011/03/vcge

Comments, suggestions, and especially corrections are welcome.

Best regards,
Augusto Herrmann
Open Data Team
Ministry of Planning, Budget & Management - Brazil

On Sun, Dec 25, 2011 at 1:32 PM, Gregg Kellogg <gregg@kellogg-assoc.com> wrote:
>
> On Wed, Nov 30, 2011 at 1:15 AM, Jeremy Tarling <jeremy.tarling@bbc.co.uk>
> wrote:
>>
>> hi, I'm working with the BBC weather web team and we'd like to add some
>> minimal RDFa to link forecast pages with their associated GeoID
>>
>> back in August Keith Alexander on this list suggested something like:
>>
>> <link rev="meteo:forecastPage" href="http://sws.geonames.org/2637142/">
>> could be added to http://www.bbc.co.uk/weather/2637142
>>
>> we were about to implement this but have hit a snag, we're using HTML5 and
>> I understand rev has been deprecated.
>>
>> has anyone come across a similar problem, or have a suggestion for an
>> alternative way of making this association?
>>
>
> @rev has not been deprecated, it's just not in the RDFa Lite profile. All
> conforming RDFa parsers will understand @rev and your example is just fine.
>
> Alternatively, you could reverse and use@about and duplicate the web page
> address in @href ursine either @property or @ref instead of @rev, but this
> is the case that @rev was created to address.
>
> Gregg
>
Received on Monday, 2 January 2012 13:06:46 UTC

This archive was generated by hypermail 2.3.1 : Sunday, 31 March 2013 14:24:37 UTC