What it is

RDFa is a W3C standard used to embed RDF data directly inside web pages by using attributes - hence the 'a' in RDFa. While RDFa is similar to microdata and microformats, it offers important advantages such as being able to use multiple vocabularies in the same page.

Source: Executive Briefing on Linked Data

Like a credit card, web pages that use RDFa have both a human-readable as well as a machine-readable side. 

RDFa attributes

RDFa uses the attributes shown below to embed meaningful data in the page by forming triple statements.

Subject or resource Predicate Literal values
  • @about

  • @resource

  • @href

  • @src

  • @property

  • @rel

  • @rev

  • @content

  • @datatype

  • @xml:lang

  • text()

How Callimachus uses RDFa attributes

Callimachus extends the RDFa syntax by allowing variables as well as URIs to be used in attributes. This allows data to be updated directly in web pages, as well as displaying updated data as it changes.

Callimachus further extends the RDFa syntax by introducing expressions that allow values to be substituted within attribute values or within text nodes.

The table below describes the purpose of each RDFa attribute and how it is represented in Callimachus.

Attribute

Purpose

Representation

@about and @src

Specifies the resource that the metadata is about.

Variable or URI

@rel and @rev

Specifies a relationship or a reverse-relationship with another resource (sometimes called object property).

Reserved keyword or CURIE

@href and @resource

  1. Specifies the partner resource of rev or rel, or

  2. Specifies the resource the metadata is about for property (when rev or rel is not present).

Variable or URI

@property

 Specifies a CURIE property for the content of an element (sometimes called datatype property).

CURIE

@content

An optional attribute that overrides the content of the element when using the property attribute.

A plain literal (string)

@datatype

An optional attribute that specifies the datatype of text specified for use with the property attribute.

@typeof

An optional attribute that specifies the RDF type(s) of the subject.

Note: Callimachus converts the attributes into graph patterns. Blank nodes and empty property contents are treated as wildcards. Graph patterns with wildcards or variables partners are optionally joined in the result.