Thinking a bit about POSTing Atom entries containing relative URI's to a collection... a key question comes to mind: what are those relative URI's relative to? Unless the entry uses xml:base, there is no base URI for an entry being POST'ed... at least, not until the server assigns one.

In a quick IM chat with Tim, he pointed out that if the client has a priori knowledge of where the content is going to be put, it's not so much of an issue.. for instance, on his weblog, the entries and the pictures, etc always go in the same directory. If you know where things are going to end up, you can set your relative paths appropriately so that things Just Work.

(Tim, please forgive me for using a few quotes from our chat.. it's easier than paraphrasing)

[TB]: In fact, I suspect an APP validator ought to emit warnings when it sees a relative URI, it's probably a symptom of an error [TB]: Just thinking out loud... at ongoing, the pictures and so on for an entry always go into the same directory as the entry so I can always say <img src="foo.jpg"/>. [TB]: But if I were using APP I'd have to post the image, then put the full URI in the article text. [TB]: BUT... a smart publishing system might well decide to peek at the incoming text, particularly if you have type="xhtml", and relativize URIs. [TB]: Anyhow, it's actually conceivable that we should have spec text saying "No particular base URI can be assumed in the body when you're POSTing to create new content".
[TB]: On the other hand, when you're updating with PUT, no problemo.

Anyone got any thoughts on this one?

- James

Reply via email to