Re: RDFa in HTML5

Hello Augusto!

On Wed, Jan 4, 2012 at 11:08 AM, Augusto Herrmann
<augusto.herrmann@gmail.com> wrote:
> The examples are displayed as (escaped) html code in the rightside
> panel on the following page: http://vocab.e.gov.br/2011/03/vcge
>
> People are meant to copy/paste the code, or just read and undestand,
> in order to learn how to mark up their own pages stating that it's
> about a subject in this controlled vocabulary. That's why we left the
> reference to the page as an empty relative URL (which should resolve
> to whatever address the page is loaded into).
>
> But we also did eat our own dog food: that page also states it's about
> the VCGE controlled vocabulary, by using RDFa 1.1 and Microdata like
> this (lines 21-25):
>
> <!-- Marking up subject using RDFa: the page is about VCGE -->
>  <meta property="http://purl.org/dc/terms/subject"
> content="http://vocab.e.gov.br/2011/03/vcge#esquema" />

Using meta with @content like this produces a literal, so from the
above you'll get:

    <http://vocab.e.gov.br/2011/03/vcge.html> dc:subject
"http://vocab.e.gov.br/2011/03/vcge#esquema"@pt_br .

, i.e. a literal (notice that it's also tagged with the language
"pt_br", inherited from @lang in the html element).

Verify this with e.g. the RDFa 1.1 distiller at [1].


> <!-- Marking up subject using Microdata: the page is about VCGE -->
>  <meta itemscope itemprop="http://schema.org/about"
> content="http://vocab.e.gov.br/2011/03/vcge#esquema" />
>
> The triple that should be extracted from the RDFa is:
>
> <http://vocab.e.gov.br/2011/03/vcge> dcterms:subject
> <http://vocab.e.gov.br/2011/03/vcge#esquema> .

To get this triple, you should use:

    <link rel="http://purl.org/dc/terms/subject"
href="http://vocab.e.gov.br/2011/03/vcge#esquema" />

(or @property instead of @rel, since RDFa 1.1 allows them to work the
same when used in conjunction with @href or @resource).

Think of the literal resulting from the meta element as a "value
primitive", and the link as a proper *reference* to a resource which
can be the subject of more triples. (There's more theory to it than
that, but I hope it explains some of it.)

Best regards,
Niklas

[1]: http://www.w3.org/2007/08/pyRdfa/Shadow.html


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

Received on Wednesday, 4 January 2012 23:21:43 UTC