xml-general mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mike Dierken <m...@DataChannel.com>
Subject RE: How to use XML to link to XML when the XML becomes HTML?
Date Mon, 03 Apr 2000 19:15:08 GMT

> If you say
>  <img src="/images/logos/main.jpg">
> the whole points is gone... and if you do content-negotiation 
> on top of
> -that- URI (which you perfectly could), it's getting even 
> more confusing
> since you are requesting a JPG image and the server returns 
> an SVG image
> depending on your browser capabilities.
> > Mime-headers & stuff only happen post request.
> Yes, that's the beauty of it.

It seems the two of you are talking about two things:
 - how to tell what the content type of one thing is
 - how to ask for the content type of many things

The content type of one resource is clearly best described via 
the Content-Type header in the HTTP response.

The content types of many things is ambiguous right now. But with a little
bit of content negotiation it is pretty straightforward.

You can ask for a resource (like a collection of things) and specify
the return type (via the 'Accept' header). This is what happens with
http://machine/something/  (Accept: text/html)

If you used Accept: text/xml you could return an XML list of the resources,
with interesting
meta-data like Content-Type. 
But then it wouldn't be 'standard' or common. This is what WebDAV addresses.
A way to use HTTP
to get a clear description of the resources (either collections or not) in a
data description
rather then a presentation description.

Alternatively, you could still use the HTML output & add an attribute to the
line items for the content type:
<a href='sub-resource' Content-Type='text/plain' title='verbose

Mike D

View raw message