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.
@@TODO - gist is that we want to retain compatibility with Yahoo's DataRSS [DATARSS]; also be compatible with Atom 1.0 syntax and semantics.
<?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].
Atom 1.0 [RFC4287] 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:
<feed>
or <entry>
, or the descendants
of any such extension elements; and
<content>
elements
which do not have a type attribute with value text
or
html
.
For the first case, this specification defines a namespaced element
<rdfa:meta>
allows any RDFa attribute to be used, as
well as xml:base
and xml:lang
.
<rdfa:meta>
is allowed as a child element of
<feed>
or <entry>
or of
<rdfa:meta>
itself. (That is, they may be nested to
an aribtrary depth.) This element is defined for convenience —
RDFa is not limited to being used on this element only, and may also
be used on other elements.
Additionally, the Atom <link>
element has rel and href attributes
which can be interpreted as RDFa. Publishers must not use RDFa features on
<link>
elements which are not compatible with Atom 1.0's
definition of the element — in particular, rel
must be a
term from the default profile, or otherwise a full, absolute URI.
@@TODO - gist should be that RDFa should be processed wherever it's found, even if it would be non-conforming according to section above.
Documents conforming to the rules in this specification are processed according to RDFa Core 1.1 [RDFA-CORE] with the following extensions:
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
.
@@TODO - maybe mention the <?profile ?>
processing
instruction from DataRSS?
RDFa Working Group has decided to have a single default profile for all host languages. That means that Atom+RDFa needs to adopt that profile. But is it also allowed to specify its own default profile that will be used in addition to the RDFa Core default profile? Atom+RDFa needs to be able to do so for compatibility with native Atom semantics.
The default profile is obtained by processing the XML version [REL-REG] of the IETF Link Registry [RFC5988] with the following XSL Transformation:
<?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:reg="http://www.iana.org/assignments" xmlns:dc="http://purl.org/dc/terms/" xmlns:rel="http://www.iana.org/assignments/relation/" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#" xmlns:xsd="http://www.w3.org/2001/XMLSchema#" xmlns:rdfa="http://www.w3.org/ns/rdfa#"> <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"/> </reg:registry> </xsl:template> <xsl:template match="reg:title"> <reg:title property="dc:title" xml:lang="en"> <xsl:value-of select="."/> </reg:title> </xsl:template> <xsl:template match="reg:updated"> <reg:updated property="dc:modified" datatype="xsd:date"> <xsl:value-of select="."/> </reg:updated> </xsl:template> <xsl:template match="reg:record"> <reg:record typeof="rdfa:TermMapping" property="rdfa:uri" content="http://www.iana.org/assignments/relation/{reg:value}"> <xsl:apply-templates select="reg:value"/> <xsl:apply-templates select="reg:description"/> <xsl:apply-templates select="reg:xref[@type='uri']"/> </reg:record> </xsl:template> <xsl:template match="reg:value"> <reg:value property="rdfa:term"> <xsl:value-of select="."/> </reg:value> </xsl:template> <xsl:template match="reg:description"> <reg:description about="[rel:{ancestor::reg:record/reg:value}]" property="rdfs:comment" xml:lang="en"> <xsl:value-of select="."/> </reg:description> </xsl:template> <xsl:template match="reg:xref[@type='uri']"> <reg:xref about="[rel:{ancestor::reg:record/reg:value}]" rel="rdfs:seeAlso" resource="{./@data}"> <xsl:value-of select="."/> </reg:xref> </xsl:template> </xsl:stylesheet>
Implementations are not required to implement XSLT. Other techniques that result in an equivalent profile are allowed.
This section is non-normative.
@@TODO - gist is that Atom's native semantics can be uplifted to an RDF graph via AtomOWL [AWOL]; describe how to merge this graph with the default RDFa graph.
@@TODO - provide a schema for Atom+RDFa
Many thanks to Robin Berjon for making our lives so much easier with his cool tool.