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.



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


  1. 1 WLW+AtomPub: Introduction « whateverblog.
  2. 2 Links for Fri 26 Oct 2007 | Joseph Scott's Blog

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s


Follow

Get every new post delivered to your Inbox.