Loading ...
Sorry, an error occurred while loading the content.

3457Re: [rest-discuss] Rebel

Expand Messages
  • Richard Padley
    Mar 3, 2003
      Jeffrey Winter wrote:
      > As far as exports are concered I'd imagine that you could deal with the
      > issue of XBEL fragments vs conformant XBEL documents by using content
      > negotiation, rather than a separate URI space. Sending the appropriate
      > Accept: header would indicate whether a fragment or a standalone XBEL
      > document was required. Or would this be an abuse of Accept:? This
      > approach could also be used to specify 'flat' for neseted resource
      > expansions.
      >
      >
      > I'm not sure that there is any hard-and-fast rule about how to employ
      > the Accept: header, but I think the general use case is one in which
      > the various resource respresentations are otherwise addressable on
      > their own. For example, you PUT to
      >
      > /image/test.jpg
      > /image/test.bmp
      > /image/test.gif
      >
      > but GET from
      >
      > /image/test
      >
      > with an appropriate Accept header.

      This still would fit with the fragment vs complete doc issue - just take
      a couple of file extension, one for fragment (e.g. .frag), one for
      standalone compliant doc (.e.g. .xml). Then

      GET /xbel/hello-world.frag

      will return just the fragment, and

      GET /xbel/hello-world.xml

      will return the standalone compliant doc. Whats more this maps
      completely to the approach of using the accept header, one just needs a
      couple of mime type (mabe there is a standard for the XBEL one already?)

      GET /xbel/hello-world
      Accept: application/x-xbel-fragment

      would give one representation, the other would be

      GET /xbel/hello-world
      Accept: application/x-xbel-standalone

      >
      > Most of the examples I've seen of pushing the Accept: header much
      > beyond this start to subtly introduce what amounts to a hidden
      > address space.

      Yes and no. I see nothing wrong with using Accept: to choose the
      representation you want - its much cleaner than using a filename,
      because it allows multiple representations to have the same URI. By
      choosing a different URI (xbel-export) yu've effectively gone down the
      filename-like route, the only difference being folder name instead of
      file-extension (neither of which should matter to a client as the URI is
      opaque).

      >
      > - Jeff
    • Show all 10 messages in this topic