Moving from Atom 0.3 to 1.0
Thursday, 21 July 2005
Now that the Atom 1.0 specification is pretty much final and waiting for approval we are going to see a lot of people moving from Atom 0.3 to Atom 1.0. Many people will automatically move to Atom 1.0 when they upgrade their weblog software, or when large weblog providers such as Blogger update their software. The rest of us, who are going to change our feeds manually are going to run into a number of differences between Atom 0.3 and Atom 1.0.
Below I will highlight some of the main changes. This is a guideline to help you update your feed and make it validate. This is by no means a complete description of Atom 1.0. It does not contain a complete list of all changes and all new elements. If you want to know every little detail about the Atom 1.0 standard you need to read the specification itself.
The feed element
In version 0.3, the
feed element used to define the version number and the XML namespace. In the new Atom 1.0 specification the
feed element still exists, but there are a couple of changes.
One of the first things you will notice is that Atom 1.0 uses a new XML namespace. The version 0.3 namespace used to be
http://purl.org/atom/ns#, which you are going to have to change to
The next change is that the
version attribute is dropped. This attribute used to indicate which version of the Atom specification was used. From now on this will be handled by the namespace, I believe. If you want your feed to validate properly you are going to have to delete this attribute.
The id element
There are not many changes to the
id element, except that it is now required for both the main
feed element, as for all the
entry elements. So, if your feed does not already use an id for both these elements, you must add them now. If you want more information about generating proper ids for your Atom feed, read the article How to make a good ID in Atom by Mark Pilgrim.
The author element
feed element must contain an
author element, unless all
entry elements contain an
author element. This has not changed, but it is now allowed to use more than one
author element. For example, if you wrote an article together with another person, you could add two
author elements. One for yourself and one for the other author.
tagline subtitle element
The Atom 0.3 specification defined a
tagline element which was used to convey a human-readable description for the feed. This element was renamed to
subtitle in the Atom 1.0 specification.
copyright rights element
The Atom 0.3
copyright element is also renamed in the Atom 1.0 spec. The new element is called
rights. One other change is that the
rights element is now also allowed in
entry elements, while previously it was restricted to the
The generator element
url attribute of this element was renamed to
uri. If your feed contains a
generator element, you must also rename the
url attribute to
uri, otherwise the feed will not validate.
info element is completely removed from the Atom 1.0 spec and has not been replaced with another element. If you use
info elements in your old Atom 0.3 feed, you should remove them.
modified updated element
modified element was renamed to
updated in the Atom 1.0 spec. The
updated element is still required for the
feed element and each
entry element, but the date no longer has to be in the UTC timezone. One major change is also that the
updated element no longer needs to be changed for each modification. You can decide for yourself which modification warrants a change to the
issued published element
issued element was also renamed. This element is now called
published and is no longer required for each
This element is the second that has been dropped from the Atom 1.0 specification and if your feed uses this element you need to remove it.
The link element
There are a number of changes to the
link element, but mostly they are additions, such as the
One change is that the value of
rel, the relationship of the link to the feed or entry, is no longer defined by the Atom API specification, instead they should be registered with the IANA. The Atom 1.0 specification does define five initial relationships of which the first already existed:
rel attribute is also not required anymore, just like the
In case of the
feed element there are two changes: a link with the relationship of
alternative is no longer required. Instead it is highly recommended to add a link with the relationship
self, which points to the IRI where this feed can be retrieved.
The category element
Until recently it was not possible to defined categories or tags in Atom. Some people created a workaround for this by importing the Dublin Core namespace and using its
subject element. This is no longer needed, because as of version 1.0 Atom now includes the
category element can occur multiple times within a
entry elements. The precise contents of the
label attributes are not defined and could look like this:
<entry> <title>Moving from Atom 0.3 to 1.0</title> <link rel='alternate' src='http://www.rakaz.nl/nucleus/item/103' /> <category term='atom' scheme='http://www.rakaz.nl/nucleus/tags' /> <category term='feed' scheme='http://www.rakaz.nl/nucleus/tags' /> <category term='standards' scheme='http://www.rakaz.nl/nucleus/tags' /> ...
Person constructs: the name,
url uri and email elements
In an effort to rename all occurrences of URL to URI, the
url element was also renamed. The new
uri element functions in exactly the same way as the
url element used to do, so the only thing you will have to do is rename all
Text contructs: the title,
tagline subtitle, summary and content elements
One of the big changes between Atom 0.3 and Atom 1.0 is the way text constructs are defined, starting with the name. Text constructs were initially called Content constructs.
Atom 1.0 defines that text constructs have a
type attribute which can be one of the following values:
xhtml. In addition to that, the
content element can also contain a MIME media type as the value of the
type attribute. The
mode attribute has been removed by the Atom 1.0 specification.
|Version 0.3||Version 1.0|
In the table above you can see how the new values of
type map to the old
mode combinations. If your feed uses a different combination of
mode, you may need to read the new specification carefully to determine how you must change the content of your feed.
text is used by default if the
type attribute is not defined in the text contruct.
It is not easy to determine how much work it will take to convert your Atom 0.3 feed to Atom 1.0. It depends on which features your feed uses, but it most cases it will require only relatively few changes. Atom 1.0 is not a completely new standard, and despite that it is not compatible with Atom 0.3 in many ways, you can clearly see that the new standard is a descendant of the work done by Mark Nottingham and many others on the Atom wiki little more than a year and a half ago.