This document is licensed under a Creative Commons Attribution 3.0 License.
This document is merely a public working draft of a potential specification. It has no official standing of any kind and does not represent the support or consensus of any standards organisation.
This section is non-normative.
Atom+RDFa 1.1 is a specification for generating and processing RDFa 1.1 data in Atom 1.0 documents. It is inspired by Yahoo!'s DataRSS specification [DATARSS], and aims to retain compatibility with this where practical. It also aims to preserve the native semantics of Atom 1.0 documents.
An example Atom+RDFa document is shown below.
<?xml version="1.0" encoding="utf-8"?> <feed xmlns="http://www.w3.org/2005/Atom" xmlns:rdfa="http://www.w3.org/ns/rdfa#" xmlns:dc="http://purl.org/dc/terms/" xmlns:xsd="http://www.w3.org/2001/XMLSchema#" xmlns:foaf="http://xmlns.com/foaf/0.1/"> <title>Example Feed</title> <link rel="self" href="http://example.org/"/> <updated>2003-12-13T18:30:02Z</updated> <author> <name>John Doe</name> </author> <id>urn:uuid:60a76c80-d399-11d9-b93C-0003939e0af6</id> <entry> <title>Atom-Powered Robots Run Amok</title> <link rel="self" href="http://example.org/2003/12/13/atom03"/> <id>urn:uuid:1225c695-cfb8-4ebb-aaaa-80da344efa6a</id> <updated>2003-12-13T18:30:02Z</updated> <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" /> </rdfa:meta> </entry> </feed>
This is equivalent to the following RDF data, shown in Turtle [TURTLE]:
@prefix dc: <http://purl.org/dc/terms/> . @prefix foaf: <http://xmlns.com/foaf/0.1/> . @prefix rel: <http://www.iana.org/assignments/relation/> . @prefix xsd: <http://www.w3.org/2001/XMLSchema#> . _:feed rel:self <http://example.org/> . _:entry rel:self <http://example.org/2003/12/13/atom03> ; dc:dateCopyrighted "2003-12-11"^^xsd:date ; dc:rightsHolder _:r . _:r a foaf:Person ; foaf:name "John Doe" .
As well as sections marked as non-normative, all authoring guidelines, diagrams, examples, and notes in this specification are non-normative. Everything else in this specification is normative.
The key words must, must not, required, should, should not, recommended, may, and optional in this specification are to be interpreted as described in [RFC2119].
A conforming Atom+RDFa 1.1 processor must either fully process Atom+RDFa 1.1 according to the RDFa Core 1.1 [RDFA-CORE] with the extensions defined in section 3. Additional RDFa Processing Rules (even if that document is non-conforming according to section 2.3 Atom+RDFa 1.1 Document Conformance), or refuse to process the document at all (for instance if the XML is not well-formed).
All conformant Atom+RDFa 1.1 resources must be conformant to Atom 1.0 [RFC4287].
This specification allows any attribute defined in RDFa Core 1.1 [RDFA-CORE], to appear on any of the following elements:
<feed>
, and on elements which are the descendents of
those.
<entry>
, and on elements which are the descendents of
those.
<content>
elements
which do not have a type attribute with value text
or
html
.
<link>
Element
The Atom <link>
element has existing rel
and
href
attributes which can be interpreted as RDFa. Publishers
must not use any RDFa features on <link>
elements which are
incompatible with Atom 1.0's definition of the element — in particular:
If a <link>
element is not in the scope of any
vocab
attribute, or is in the scope of a vocab
attribute that sets the default vocabulary to
http://www.iana.org/assignments/relation/
, then
tokens in the rel
attribute of the <link>
element must take the form of:
CURIEs must not be used.
If a <link>
element is in the scope of a vocab
attribute that sets the default vocabulary to something other than
http://www.iana.org/assignments/relation/
, then
tokens in the rel
attribute of the <link>
element must take the form of:
CURIEs and terms from the default vocabulary must not be used.
Note that the above restrictions on the rel
attributes of
<link>
elements affect document conformance only. RDFa processors
are still expected to consume tokens in rel
regardless of
whether these conformance criteria are followed.
<rdfa:meta>
Element
This specification defines a namespaced element
<rdfa:meta>
which allows any RDFa attribute to appear on
it, as well as xml:base
and xml:lang
.
The <rdfa:meta>
element may be used as a child element
of:
<feed>
<entry>
<rdfa:meta>
(That is, they may be nested to an aribtrary depth.)This element has localname "meta" and namespace URI http://www.w3.org/ns/rdfa#.
This element is defined purely for convenience — RDFa is not limited to being used on this element only, and may also be used on other elements as detailed above.
Documents conforming to the rules in this specification are processed according to RDFa Core 1.1 [RDFA-CORE] with the following extensions:
http://www.iana.org/assignments/relation/
.
about
, href
, resource
,
or src
), then first check to see if the element is an
<entry>
element. If it is, then behave as if there is a
typeof
present with the empty string as its attribute
value, and process it according to the rule for typeof
.
about
, href
, resource
,
or src
), then first check to see if the element is an
<entry>
element. If it is, then behave as if there is a
typeof
present with the empty string as its attribute
value, and process it according to the rule for typeof
.
In Atom 1.0, rel
defaults to "alternate".
rel
attributes of existing Atom documents.
An alternative would be to use the registry of link relations
[REL-REG] but this is updated too frequently to be practical.
<entry>
elements is
necessary to correctly interpret Atom's native <link>
elements, and also appears to be assumed by [DATARSS].
This section is non-normative.
@@TODO - maybe expand upon this section?
AtomOWL [AWOL] describes a mapping from Atom 1.0 syntax to an RDF vocabulary. This section provides guidelines for merging a graph produced from this mapping, with the Atom+RDFa 1.1 output graph.
typeof
attribute on <entry>
elements
may be equated with those from AtomOWL.
This section is non-normative.
Yahoo! published a specification for RDFa in Atom called "DataRSS". That specification is no longer available from the DataRSS website, but many of its design decisions influenced Atom+RDFa 1.1. Indeed, the concept of predefined prefixes in RDFa Core 1.1 owes much to DataRSS.
An Atom+RDFa 1.1 processor may be used to process DataRSS by adding the DataRSS Context [DATACONTEXT] to its initial context.
@@TODO - provide a schema for Atom+RDFa
Many thanks to Robin Berjon for making our lives so much easier with his cool tool.