RDFa Host Languages

From RDFaWiki

Jump to: navigation, search

RDFa is normally used within XHTML - this is the usage described in the Recommendation - however this flexible collection of attributes has also been deployed in other host languages.

Contents

Presentation-Oriented Languages

These languages have little annotation support of their own, if any. RDFa adds the possibility to annotate fragments.

SVG Tiny 1.2

SVG Tiny 1.2 metadata allows RDFa's attributes to be used. It doesn't provide guidance on how to parse RDFa in SVG, other than referencing the XHTML+RDFa recommendation.

Features of the host language relevant to RDFa:

  • The XHTML <head> and <body> elements do not exist, so their special treatment should be ignored.
  • The XHTML <base> element does not exist and base URLs are set using the xml:base attribute instead.
  • Should the predefined XHTML+RDFa keywords (e.g. "next", "prev") be supported in SVG?
  • SVG can contain RDF/XML chunks - these need to be parsed as RDF/XML and added to the same graph as the RDFa triples.

RDFa in HTML

An HTMLWG Working Draft defines RDFa in HTML.

Features of the host language relevant to RDFa:

  • HTML in general cannot be parsed with an XML parser. Serialising rdf:XMLLiteral literals may be more challenging.
  • The lang attribute may be used to specify text language, in addition to xml:lang.
  • Attributes are case-insensitive (canonicalised to lower case) so CURIE-prefixes need to be treated case-insensitively too.

OpenDocument

For version 1.2 of the Open Document Format (used e.g. by OpenOffice) it is planned to integrate RDFa.

(a recent talk)

Semantics-Oriented Languages

These languages have always supported certain annotations of fragments, but only with a restricted, native vocabulary. Integrating RDFa allowed for extending the vocabulary.

DataRSS (RDFa in Atom 1.0)

Yahoo's DataRSS is a format for embedding arbitrary RDF data in Atom.

Features of the host language relevant to RDFa:

  • The XHTML <head> and <body> elements do not exist, so their special treatment should be ignored.
  • The XHTML <base> element does not exist and base URLs are set using the xml:base attribute instead.
  • DataRSS defines not only attributes, but also some elements. Particular RDFa attributes are only supposed to be allowed on particular elements (and rev is not allowed on any element). RDFa parsers should probably ignore this restriction; it only being relevant to validators.

OMDoc

OMDoc is a semantic markup language for mathematical documents. In version 1.3 RDFa-based metadata has been integrated. The actual specification is currently being written. The technicalities of integrating RDFa have mostly been settled, but the specification text needs further revision. See also this older, more concise but no longer entirely correct overview (section 4).

Features of the host language relevant to RDFa:

  • The XHTML <head> and <body> elements do not exist, so their special treatment should be ignored.
  • The XHTML <base> element does not exist. xml:base is not supported either, as OMDoc's primary data, i.e. mathematical concepts, are referenced by different means anyway.
  • The XHTML+RDFa keywords do not make sense in OMDoc and therefore are not supported. CURIEs with an empty namespace prefix (:name) or without a prefix (name) are not supported, but may be supported in future versions. If ever, language-specific keywords will be specified as prefix-less CURIEs, and not as a construct of its own.
  • While full RDFa is supported, a restricted set of elements and attributes forms a metadata syntax that is particularly recommended.
  • The non-RDFa metadata syntax of earlier versions is supported for backwards compatibility. It will, with extensions and updates as appropriate, continue to be supported in future versions, as it is easier to author and to validate. The semantics of that metadata syntax, however, is established by mapping it to RDFa. The Krextor RDF extractor offers specific support for these features.

DocBook

The schema of DocBook is designed in an extensible way. Bob DuCharme has proposed an extension by RDFa. Norman Walsh is not entirely sure whether that is a good idea.

DITA

The schema of DITA is designed in an extensible way; it actually has to be extended (“specialized”) in order to make use of DITA. Bob DuCharme has proposed an extension by RDFa.