Abstract
Create an XML vocabulary to express the map of a given site.
Status
Incomplete.
Related and Conflicting Proposals
Rationale
For both the Atom API and format, it would be convinient to be able to automatically find URIs for the feed, a service endpoint for POST operations, perhaps the URI of the homepage of a given user, and so on. To solve this, we could create a standard way of obtaining all these URIs, by placing an XML file at a given place on a web server. This file would be a «site map».
Proposal
Squeeze in a new section after section 4 The atom:feed Element:
5 The atom:sitemap Element
The "atom:sitemap" element is the document (i.e., top-level) element of the map of a given site. Its children define the structure of the site it is placed on.
5.1 the version attribute
atom:sitemap MUST have a version attribute whose content indicates the version of the Atom specificatin that the construct conforms to. The version identifier for this specification is "0.3".
5.2 the xml:lang attribute
atom:sitemap MAY have an xml:lang attribute whose content indicates the default natural language of the sitemap. The content of this attribute element MUST be a registered language tag [RFC3066].
5.3 the atom:href attribute
atom:sitemap SHOULD have an atom:href attribute whose content is the URI of the sitemap file (i.e. the file you're looking at).
Examples
http://example.org/reilly/sitemap.atom
<?xml version="1.0" encoding='utf-8'?>
<sitemap version="0.3" xmlns="http://purl.org/atom/ns#"
href="http://example.org/reilly/sitemap">
<link rel="alternate" type="text/html"
href="http://example.org/reilly/sitemap.html"/>
<link rel="site" type="application/atom+xml"
href="http://example.org/reilly/site.atom"/>
<link rel="site" type="application/atom+xml"
href="http://example.org/reilly//b/site.atom"/>
<link rel="site" type="application/atom+xml"
href="http://example.org/reilly/tplt/site.atom"/>
</sitemap>http://example.org/reilly/site.atom
<?xml version="1.0" encoding='utf-8'?>
<site xmlns="http://purl.org/atom/ns#";>
<title>Main Site</title>
<id>http://example.org/reilly/site</id>
<author>
<name>Reilly</name>
<email>reilly@xxxxxxxxxxx</email>
</author>
<copyright>Copyright (C) 2004.</copyright>
<link rel="service.post" type="application/atom+xml"
href="http://example.org/reilly/post"; />
<link rel="service.feed" type="application/atom+xml"
href="http://example.org/reilly/feed"; />
<link rel="alternate" type="text/html"
href="http://example.org/reilly/"; />
<link rel="sitemap" type="application/atom+xml"
href="http://example.org/reilly/introspection.atom"; />
</site>http://example.org/reilly/00001.atom
<?xml version="1.0" encoding='utf-8'?>
<entry xmlns="http://purl.org/atom/ns#";>
<title>Fluffy Kittens</title>
<link rel="alternate" type="text/html"
href="http://example.org/reilly/00001.html"/>
<link rel="site" type="application/atom+xml"
href="http://example.org/reilly/site.atom"/>
<issued>2004-05-27T03:48:48Z</issued>
<modified>2004-05-27T03:48:48Z</modified>
<id>http://example.org/reilly/00001</id>
<link rel="site" type="application/atom+xml"
href="http://example.org/reilly/site.atom"/>
<content type="image/jpeg"
src="http://example.org/images/fluffy-kittens.jpg"/>
</entry>In the "Is another file format really needed?" thread I mentioned that indexes are possibly poorly mapped by feeds, so here's an index:
http://example.org/reilly/index-200405.atom
<?xml version="1.0" encoding='utf-8'?>
<index xmlns="http://purl.org/atom/ns#";>
<link rel="up" type="application/atom.xml"
href="http://example.org/reilly/index-2004.atom";>
<link rel="prev" type="application/atom.xml"
href="http://example.org/reilly/index-200404.atom";>
<link rel="next" type="application/atom.xml"
href="http://example.org/reilly/index-200406.atom";>
<entry>
<title>Fluffy Kittens</title>
<link rel="alternate" type="text/html"
href="http://example.org/reilly/00001.html"/>
<link rel="alternate" type="application/atom+xml"
href="http://example.org/reilly/00001.atom"/>
<link rel="site" type="application/atom+xml"
href="http://example.org/reilly/site.atom"/>
<author>
<name>Reilly</name>
<email>reilly@xxxxxxxxxxx</email>
</author>
<issued>2004-05-27T03:48:48Z</issued>
<modified>2004-05-27T03:48:48Z</modified>
<id>http://example.org/reilly/00001</id>
</entry>
</index>