Atom plus RDFa

From RDFa Working Group Wiki
Jump to: navigation, search

Atom 1.0 + RDFa 1.1

14 November 2010

Toby Inkster, Invited Expert


This document provides guidance for embedding RDFa in Atom 1.0 entries and feeds; and details for how to parse it.

Status of This Document

This section describes the status of this document at the time of its publication. Other documents may supersede this document. A list of current W3C publications and the latest revision of this technical report can be found in the W3C technical reports index at

This document was developed by the RDFa Working Group. This document has no formal status (it is neither a W3C Recommendation nor a Working Group Note).


@@TODO - gist is that we want to retain compatibility with Yahoo's DataRSS; also be compatible with Atom 1.0 sytax and semantics.

Here is an example Atom+RDFa feed:

<?xml version="1.0" encoding="utf-8"?>
<feed xmlns=""

	<title>Example Feed</title>
	<link rel="self" href=""/>
		<name>John Doe</name>

		<title>Atom-Powered Robots Run Amok</title>
		<link rel="self" href=""/>
		<summary>Some text.</summary>
		<rdfa:meta property="dc:dateCopyrighted" content="2003-12-11" datatype="xsd:date" />
		<rdfa:meta rel="dc:rightsHolder">
			<rdfa:meta typeof="foaf:Person" property="foaf:name" content="John Doe" />


This results in the following RDF data:

@prefix dc:   <> .
@prefix foaf: <> .
@prefix rel:  <> .
@prefix xsd:  <> .

_:feed rel:self <> .

_:entry rel:self <> ;
    dc:dateCopyrighted "2003-12-11"^^xsd:date ;
    dc:rightsHolder _:r .

_:r a foaf:Person ;
    foaf:name "John Doe" .


Document Conformance

[RFC 4287] offers a number of places for extensions to slot in without disrupting existing Atom parsing tools. However, this specification only allows RDFa attributes in a conservative set of places:

  1. On extension elements (non-Atom namespace) which are the direct children of <feed> or <entry>, or the descendants of any such extension elements; and
  2. On elements that are descendants of Atom <content> elements which do not have a type attribute with value "text" or "html".

For the first case, this specification defines a namespaced element {}meta suitable for using as a child of <feed> or <entry>.

Additionally, the Atom <link> element has rel and href attributes which will be interpreted as RDFa. Publishers must ensure that they do not use RDFa features on <link> elements which are not supported in Atom 1.0 - in particular, rel should be a term from the default profile, or should be a full absolute URI.

User Agent Conformance

@@TODO - gist should be that RDFa should be processed wherever it's found, even if it would be non-conforming according to section above.

Additional RDFa Processing Rules

Documents conforming to the rules in this specification are processed according to [CORE] with the following extensions:

  • The default vocabulary URI is undefined.
  • The default collection of terms is defined via an RDFa Profile document detailed in the section below.
  • The base can be set using the xml:base attribute as defined in [XMLBASE].
  • The current language can be set using only the @xml:lang attribute.
  • In section 7.5, processing step 6, if no URI is provided by a resource attribute (e.g., @about, @href, @resource, or @src), then first check to see if the element is an <entry> element. If it is, then act as if there is an empty @typeof present, and process it according to the rule for @typeof.
  • In section 7.5, processing step 7, if no URI is provided by a resource attribute (e.g., @about, @href, @resource, or @src), then first check to see if the element is an <entry> element. If it is, then act as if there is an empty @typeof present, and process it according to the rule for @typeof.

@@TODO - maybe mention the <?profile ?> processing instruction?

Default Profile

The default profile is obtained by processing the XML version of the IETF Link Registry (see [REL]) with the following XSL Transformation:

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0"
	<xsl:output method="xml" indent="yes"/> 
	<xsl:template match="//reg:registry[@id]">
		<reg:registry id="{@id}" about="#{@id}">
			<xsl:apply-templates select="reg:title"/>
			<xsl:apply-templates select="reg:updated"/>
			<xsl:apply-templates select="reg:registry"/>
			<xsl:apply-templates select="reg:record"/>

	<xsl:template match="reg:title">
		<reg:title property="dc:title" xml:lang="en">
			<xsl:value-of select="."/>

	<xsl:template match="reg:updated">
		<reg:updated property="dc:modified" datatype="xsd:date">
			<xsl:value-of select="."/>
	<xsl:template match="reg:record">
		<reg:record typeof="rdfa:TermMapping"
			<xsl:apply-templates select="reg:value"/>
			<xsl:apply-templates select="reg:description"/>
			<xsl:apply-templates select="reg:xref[@type='uri']"/>

	<xsl:template match="reg:value">
		<reg:value property="rdfa:term">
			<xsl:value-of select="."/>

	<xsl:template match="reg:description">
			<xsl:value-of select="."/>

	<xsl:template match="reg:xref[@type='uri']">
			<xsl:value-of select="."/>


Native Atom Semantics

@@TODO - gist is that Atom's native semantics can be uplifted to an RDF graph via AtomOWL; describe how to merge this graph with the default RDFa graph.