WLW+AtomPub, Part 4: Categories


Those of us in the blogging world have a very specific idea of what "categories" are used for; they represent human-readable labels that are used to group related blog posts, so that (human) readers can easily retrieve a list of your posts that relate to a particular topic. For the purposes of this post, I’ll refer to this as a "blog-category".

This is what RFC4287 has to say about categories (section 4.2.2):

The "atom:category" element conveys information about a category associated with an entry or feed.  This specification assigns no meaning to the content (if any) of this element.

Atom server implementers have taken this to heart, and assign semantics to categories that are very different than blog-categories. For example, GData has a category scheme that is used to assign a "type" to an entry. Lotus Connections uses categories to represent some internal flags that are specific to their implementation. My point is this: just because a collection has some categories doesn’t mean they are blog-categories, and if not, we don’t want to show them to the user.

The second problem is that a single collection could use more than one scheme for blog-categories. For example, Roller has two separate schemes, one for a fixed list of categories that all blogs have and another for categories that the user has added. (I think that’s right… it’s been a while.) And now that WordPress has native support for tags (in addition to their traditional category support), it’s easy to imagine them exposing both of those as Atom categories with two different schemes.

Let’s answer the second question first: Writer can only support one scheme per blog. Our category choosing UI was not designed to deal with multiple namespaces, but even if it was, AtomPub doesn’t give clients a human-readable name for a scheme (like "Tags" for example).

So the first question really becomes, how can Writer determine which single scheme, if any, should be used for blog-categories?

  1. If wlwmanifest.xml has a <categoryScheme> option, that’s the scheme that is used. <supportsNewCategories> will also be respected. (Sorry, the MSDN documentation has not yet been updated to reflect this.) For example:
  2. If <categories fixed="no" /> is in the service document, the empty scheme is used.
  3. If <categories scheme="" fixed="yes|no" /> is in the service document, the empty scheme is used.
  4. Otherwise, categories are not supported.

(#3 may or may not be legal Atom, but there doesn’t seem to be a better way to express that a collection has a fixed set of categories that don’t use a scheme.)

This stuff is about as ugly as Writer’s AtomPub implementation gets; categories are currently a weakness in Atom, and I hope we in the blogging software development community can come up with a standard set of extensions for exposing blog-categories.


5 Responses to “WLW+AtomPub, Part 4: Categories”

  1. 1 iamduyu

    Where’s the blog-tags tag in AtomPub?And allow-comment/allow-ping and so on.AtomPub still lacks those.
    what’s the problem about MetaWeblog to make gays think it’s obsolete?
    I’m implementing a blog-client server for a massive used blogware in China mainland.So,AtomPub and MetaWeblog,I have to make a choice.

  2. iamduyu, please e-mail me at joe.cheng *AT* microsoft.com. Thanks!

  3. 3 emilk


    supportsHierarchicalCategories is WP exclusive,
    or is it also supported for atom+pub blogs?

    as suggested in


  4. Sorry, supportsHierarchicalCategories is for MetaWeblog/MovableType/WordPress API’s only.

  1. 1 WLW+AtomPub: Introduction « whateverblog.

%d bloggers like this: