Re: Proposal for containers

hello henry.

On 2013-01-31 11:32 , "Henry Story" <henry.story@bblfish.net> wrote:
>I am not misunderstanding this.
>In section 9.2.1 of AtomPub the following example is given:
>http://tools.ietf.org/html/rfc5023#section-9.2.1
>
>       POST /edit/ HTTP/1.1
>       Host: example.org
>       User-Agent: Thingio/1.0
>       Authorization: Basic ZGFmZnk6c2VjZXJldA==
>       Content-Type: application/atom+xml;type=entry
>       Content-Length: nnn
>       Slug: First Post
>
>The way Atom pub distinguishes the types of the content is
>by annotating the mime type.

nope. http://tools.ietf.org/html/rfc5023#section-9.6

'For Resource creation, this specification only defines cases where
   the POST body has an Atom Entry entity declared as an Atom media type
   ("application/atom+xml"), or a non-Atom entity declared as a non-Atom
   media type.  When a client is POSTing an Atom Entry to a Collection,
   it may use a media type of either "application/atom+xml" or
"application/atom +xml;type=entry".'

http://tools.ietf.org/html/rfc5023#section-12.1

'If not specified, the type is assumed to be unspecified, requiring
   Atom processors to examine the root element to determine the type of
   Atom document.'

simply put, there is no need to distinguish the type of content because
the content is self-describing. of course, media type matter in atom
because you can POST entries of any media type (as long as the collection
accepts those media types), but that's a different issue.

> This works for something as limited
>in design and scope as Atom, because the types of things it deals
>with are either atom/entry or atom/feed elements. But in RDF
>where you could say the type of a text/turtle document could
>be infinitely varied, you could not start defining these types of
>things. Or if you did your type would have to have a URL as value.
>Which is just to say that you are putting the information in the
>wrong place.

there is no difference between XML or RDF on this level. you POST
something, and that something has to be self-describing so that in the
context of the protocol, the server can figure out what to do. in atom,
the server looks at the ;type= or it looks at the document element. in
both cases, the server knows what it got. in LDP, we will have to say that
when you POST a 

<> a ldp:Container

or a

<> a ldp:Entry

then different things will happen: in one case, you create a container, in
the other an entry. there likely will be additional metadata in these
representations (required and optional LDP metadata, and any other
additional metadata), but this is how the client intent is represented and
then transferred to the server.

cheers,

dret.

Received on Thursday, 31 January 2013 11:31:33 UTC