Re: Media Type Sub-Sub-types?

On 4/5/10 7:47 PM, Nathan wrote:
> Following suite with the top-posting :)
>
> In all honesty I only see need for this in very specific use cases,
> going through most of the HTTP methods here's how I (personally) see it:
>
> GET - You either GET a resource blindly and when you get a successful
> response you process the information you receive if you understand it,
> and in the case of rdf, xml, json etc you only process what you
> understand and ignore the rest, so it's a non-issue. (Because you're not
> going to keep on re-requesting the same resource expecting it to
> suddenly change to what you want, no amount of negotiation will do that
> - and any indication of sub-negotiation where representations contain
> different content is imho a blatant miss-use or some kind of weird
> anti-pattern)
>    
Well, I don't think software program works like that. When we write a 
software, we pretty much know exactly what we can or cannot process. 
Having a semantic type makes that possible. If I know that I can 
understand a document of type X written in syntax Y, I explicitly 
request that. Giving me another type X1 in Y or X in Y1 doesn't suite 
the purpose.

Take XML as an example. The schema of an XML file is, in fact, its 
semantic type. If I get an XML type of a different schema, my XML parser 
can work to parse it in a tree. But that is all I can do.
> With DELETE and OPTIONS it's irrelevant, likewise with POST.
>    
I disagree. POST+form is syntactically equivalent to a GET+path/or query 
parameter. There is no essential difference here only different 
methodology.
> With PUT there is no way for a server to indicate what it Accepts any
> way. Additionally the general pattern on the web is to create a resource
> using POST and then update it using PUT, this itself indicates that in
> order to update you must already know and understand the entity at the
> resource so is a bit of a non-issue. The other use case is where people
> blindly try and PUT things to any old location on the web, but I'd
> assume that in virtually 100% of cases clients (or machines) are
> configured to use a specific location / directory to store things in, so
> again a non-issue.
>    
Really. What if I want to PUT something in a database?
> With HEAD there may be some scope for a Content-Features type header
> which indicates that the would-be returned entity contains ontologies
> x&y or in the case of XML primarily rss or atom data etc.
>
> The only uncovered functionality I can see is specifically when it comes
> to sending RDF data from client to server, using the PATCH method, and
> where server depends on that RDF data including data from a specific
> diff/patch ontology, the server can 4** fail the request but has no way
> of communicating that it Accept-Patch's of type RDF/XML using ontology
> X. This will lead to a series of machine to machine try.catch attempts
> which will add strain to the web in general and it could be avoided if
> this were addressed.
>
> AFAICT PATCH is the first verb which introduces a server media type
> dependency in order to be used (successfully) by a client (other than
> possibly form encoding for POSTs).
>    
I don't know much about these two method. But I do not think it is any 
different from GET/POST/PUT.
> Perhaps the real question is: does an ontology weigh in heavily enough
> to be considered a definition of syntax, in the specific use case of a
> functionality dependent http verb?
>    
It is a misunderstanding to equip RDF with ontology. Any typing defines 
an ontology. RDF are two things, one is URI and the other is logic. The 
former intends to unify our symbol space; the latter tries to unify 
language.
> side: personally I don't see this having anything to do with conneg or
> "content sniffing", they are more niceties than necessities as far as I
> know.
>    
It is just the opposite from my standpoint. PATCH etc are more niceties 
than necessities. I can define whatever the patching semantics in a 
document type and GET/PUT it. Don't think needs a different vocabulary 
to do it. To follow the PATCH practice, the HTTP verb will soon to explode.

Best,

Xiaoshu
> Regards,
>
> Nathan
>
> Larry Masinter wrote:
>    
>> An "Internet Media Type" is more than a definition of syntax --
>> it's is an indication of intent, by the sender, for how the sender
>> wishes the receiver to interpret the content being sent.
>>
>> While it's desirable, alas it is not supported:
>> The space of "Internet Media Types" does not provide sufficient
>> granularity for many applications that want to use the accept:
>> header to control negotiation.
>>
>> But the types available do not partition the space of
>> syntax and semantics.
>>
>> One of the sources of analysis for thinking about file types
>> and file formats is the archival community.
>>
>> http://hul.harvard.edu/ois/digpres/guidance.html
>>
>> In addition, there is the IETF work on "media features":
>> http://tools.ietf.org/html/rfc2912
>> http://tools.ietf.org/html/rfc2506
>> http://tools.ietf.org/html/rfc2938
>>
>> which was intended to provide additional information about
>> the file format other than the Internet Media Type.
>>
>> I think part of the advice I'd like to include are things
>> that Internet Media Types (MIME types) *aren't* good for,
>> even though people have tried or might think it is desirable.
>>
>> http://en.wikipedia.org/wiki/Internet_media_type
>>
>>
>> RTP and SIP have extended MIME types in ways that don't
>> exactly match MIME for email, but so has the web.
>>
>> Larry
>>
>>
>> -----Original Message-----
>> From: Xiaoshu Wang [mailto:xiao@renci.org]
>> Sent: Monday, April 05, 2010 2:09 PM
>> To: Story Henry
>> Cc: nathan@webr3.org; Larry Masinter; www-tag@w3.org
>> Subject: Re: Media Type Sub-Sub-types?
>>
>> On 4/5/10 2:44 PM, Story Henry wrote:
>>      
>>> On 5 Apr 2010, at 01:07, Nathan wrote:
>>>
>>>
>>>        
>>>> For instance, if the need for an ****+rdf media type scenario came
>>>> about, then the specification / media type could determine a fixed
>>>> serialization, as in only n3 not rdf/xml or other.
>>>>
>>>>          
>>> This is really the wrong way to do things. Media types should not determine
>>> what the content of what you are going to get back is about, only
>>> what the syntax is.
>>>
>>>        
>> This is not true. A document should have two types -- one is syntax and
>> the other semantic. (Syntax is also deal with semantic as everything
>> else in the world but it deals with the structural semantics as opposed
>> to domain semantics).
>>
>> I work in the life science domain. And often there are more than one
>> markup languages of the same syntax, e.g., in XML. The same data thus
>> can be expressed in more than one way. And since the domain semantics of
>> these markup languages are overlapping but subsuming each other, we face
>> a dilemma of how to serve them. To give each ML a URI faces the question
>> of how to linked them together. Even with the same markup languages, we
>> faced the problem how to serve different version of data under the same
>> URI. Using content negotiation helps solve these problem. But without a
>> document-type definition, it does work as well. Also, giving the type
>> definition a URI makes it further linked. I have discussed the issue at
>> http://wot.renci.org/tr/doc_uri.
>>
>> I used to define the document type as an extension to the current type.
>> Similar to Jan's proposal of using profile but using a different token.
>> However, I find it that I can not use that convention to serve with
>> straight-forward Apache's var file. The convention that I used is
>>
>> mime/type/semantic-type.
>>
>> Thus, in Jan's case, it would be as follows:
>>
>> application/http://xmlns.com/foaf/0.1/
>>
>>
>>      
>>> The way the atom people are working on creating a mime type for every
>>> application is crazy. There are an infinite number of things one can speak about. Should we have an infinite number of mime types? Clearly not.
>>>
>>> The better way to do things is to have do it through links. So when you have
>>>
>>> :joe foaf:knows :jack .
>>>
>>> The the document in which :jack is defined is clearly going to be some form of personal profile document.... At least you should find more info about jack.
>>>
>>>        
>> Well, I don't think that is good enough. If I am a JavaScript engine,
>> what should I get once I got to foaf:knows? I don't read RDF, only JSON.
>> Even if I can read JSON, that does not mean that I know how to
>> meaningfully processes all JSON's constructs that are out there, right?
>>
>> Xiaoshu
>>
>>
>>
>>
>>
>>      
>    

Received on Tuesday, 6 April 2010 00:18:17 UTC