WLW+AtomPub, Part 3: Picking Collections

25Oct07

My post on autodiscovery covered how Windows Live Writer decides which protocol to use, and how it finds the service document. Service documents can contain multiple collections; I didn’t mention how Writer decides which collection to use.

Blog Post Collections

Here’s how Writer decides what collection to use for blog posts.

First, Writer filters down the list of collections to the ones which can accept entries. At least one of the following criteria must be met:

  • No <accept> entries are present (this is a special case that is called out in RFC5023 section 8.3.4)
  • <accept>*/*</accept> is present
  • <accept>application/atom+xml;type=entry</accept> is present
  • <accept>entry</accept> is present. (This is from obsolete versions of the spec; don’t do it!)
  • <accept>application/*</accept> is present. (This is weird; don’t do it!)

If, according to these criteria, one and only one collection supports entries, we will automatically use it. If more than one collection matches, then we’ll prompt the user during configuration, using a list of names formed by [workspace title + ” – ” ] + collection title.

Image Upload Collections

If there are collections that accept images, we can use them for uploading pictures. Again, if one and only one collection accepts images, we’ll use it automatically. If there are two or more, we’ll prompt the user during configuration. A collection accepts images if one of the following is present:

  • <accept>*/*</accept>
  • <accept>image/*</accept>
  • <accept>image/png</accept> AND <accept>image/jpeg</accept> AND <accept>image/gif</accept>. We won’t use collections that (for example) only accept JPEG or don’t accept PNG, etc.

 

Notice that if there is only a single collection that accepts both entries and images according to the definitions above, we’ll happily use it for both purposes.



4 Responses to “WLW+AtomPub, Part 3: Picking Collections”

  1. Hi!

    I’m trying to implement my atompub server and I’m going to use Windows Live Writer… but when I try to post any image I get an error that says “The blog doesn’t allow the images load”… My service doc: https://gist.github.com/nicolocodev/3fd8d5d4547754ffe520

    Thanks a lot!

    Best regards🙂


  1. 1 WLW+AtomPub: Introduction « whateverblog.
  2. 2 Links for Fri 26 Oct 2007 | Joseph Scott's Blog
  3. 3 [Web API] AtomPub y Web API Soporte para multimedia | MVPs de LATAM

%d bloggers like this: