Documentation/Hidden markup

= Hidden RDFa and Microdata Markup: Pros and Cons =

There is some irritation on whether using "invisible" data snippets in RDFa or microdata syntax in HTML content. On this page, we try to explain the advantages and disadvantages of this technique.

What is hidden markup?
TBD

Advantages
First, a few arguments in favor of using invisible data content in RDFa are in[1]. Also note our two tools [2] and [3] that can generate RDFa snippets from other RDF syntaxes with ease, so you can e.g. model your data structures in nice Turtle and then derive the RDFa patterns automatically.

My main argument for the past three years of advocating this is that:

It is way more productive to do so as compared to manually weaving in RDFa patterns into existing HTML page templates for non-trivial data structures (e.g. GoodRelations).

In the case of dynamically generated content from templates using templating engines like Smarty or Jinja, the invisible content will be as current as the visible content, so the old argument of the data not being in sync with the visible content does mostly not hold.

If the HTML is non valid / buggy, then the extraction of data from a part of invisible RDFa that itself is valid (e.g. no missing closing HTML elements) is way more reliable. HTML cleaners applied to buggy HTML can often only guess the intended tree structure and thus often attach properties to the wrong entities.

The two principles of avoiding redundancy (DRY) and separation of concerns (keeping the modeling of rendering aspects separate from conceptual data modeling issues) conflict in the case of RDF in HTML.

As for the practical aspect, I recommend putting the block of invisible RDFa closely BEFORE the respective visible content. Search engines do not seem to like such blocks towards the end of the page.

Best wishes

Martin Hepp

[1] Hepp, Martin; García, Roberto; Radinger, Andreas: RDF2RDFa: Turning RDF into Snippets for Copy-and-Paste, Technical Report TR-2009-01, 2009. http://www.heppnetz.de/files/RDF2RDFa-TR.pdf

[2] http://www.ebusiness-unibw.org/tools/rdf2rdfa/

[3] http://rdf-translator.appspot.com/

What do the search engines say?
TBD