I am new to this list, so please treat me as a fresher :)

I feel the URI should be relative to the current collection. The client sholud be responsible to keep track of the user's current collection. Since the collection URI is mentioned in the introspection document, POSTing an entry should always be relative to the collection URI.

In my implementation of APP I have nested collections. Every collection has a media sub-collection of its own. So, when posting an entry, it is posted to the collection URI (mentioned in the introspection document) and any file uploads are posted to the media sub-collection relative to the current collection.  Similarly, if an entry refers any image or file, it is mapped to the entry's media-subcollection.

On 1/29/06, James M Snell <[EMAIL PROTECTED] > wrote:

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="">[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