Created on March 26, 2013, 1:26 p.m. by Hevok & updated by Hevok on May 2, 2013, 5:21 p.m.

The name RDFa comes from RDF in HTML attributes, so it is also like in Microformats that one reuses for Establish RDF Metadata or RDF Facts within the HTML Document. There are two Versions. RDFa 1.0 is based on XHTML, while RDFa 1.1 is based on HTML5. A slightly simpler of easier Version of RDFa is RDFa Lite 1.1

Compared to RDFa Lite the real standard is a bit more complex ad there one has the possibility to encode real entire RDF Databases/Knowledge bases into HTML. Therefore one needs means to transform the Triples that one has somewhere in the RDFa Notation. For example one has also to denote Objects from the Triple, this one can do for instance via the Content Attribute. This allows to separate the Content from the Representation of the Content. Whenever there is a content property, the value of the content is take as on Object and not the data that is parsed and presented in the HTML Page. Thus the Presentation is not directly coupled to the Content.

  • RDFa = RDF in HTML attributes
  • enables generic RDF-Annotations in (X)HMTL Documents by reusing existing (X)HTML attributes
    • href
    • content
    • rel
    • rev
    • src
  • With RDFa and can add additional functionality
    • separate content from Presentation
    • use Datatypes from XML Schema Definition
    • alternatives:
      • ``resources`` <> about and ``property`` <> rel
One can also define or denote Datatypes.
For instance the object behind the Property "created" should be interpreted like an XML Schema Datatype which is a year, i.e. which is a Date Datatype.

The following attributes can be used in RDFa Lite to put in the Semantic Information:

  • prefix
  • resource
  • typeof
  • property
  • vocab

In general one has to distinguish whenever one wants to transcode RDF Triples to RDFa, one has to differentiate between Triples where the Object is a Resource or where the Object is a Literal. Whenever the Object is a Literal, the Object will be decoded in the content Attribute or as parsed character Data within the HTML Document inside the opening and closing Tags. On the other hand whenever the Object is a Resource, which means it is a URI, then one can give the URI directly in HTML via the href or one can use the resource tag to denote it is a URI. In the same way one can denote the Subject as resource or about. For the Property one can use the property or also the rel Tag/Attribute inside any Tag that one wants to use for that.

Object Type Subject Property Object
Object is Literal resource/about property content or #PCDATA
Object is Resource (URI) resource/about property/rel href or resource
<span about="subject">...span>
generates a temporary Subject for single/multiple Triples

<a href="object" rel="property">...a>
defines a linked Triple

<span property="property">objectspan>
defines a unlinked Triple

With this one has simple means to get RDF Data which means Semantic Metadata that might refer to a Vocabulary, which in turn might refer to a more complex Ontology and one can put this Information inside HTML Pages. For this one does not need a SPARQL endpoint nor a Database. One can put this into the Web, i.e. HTML Pages and it can be parsed by Applications.

RDFa is already applied by big companies.


Tags: web, metadata, RDF, rdf, encoding, format
Categories: Concept, reST
Parent: Semantic Metadata
Children: RDFa 1.0, RDFa 1.1, RDFa Extractor, RDFa Lite

Update entry (Admin) | See changes

Comment on This Data Unit