W3C home > Mailing lists > Public > public-ws-media-types@w3.org > September 2004

New Issue (media-types) Optionality of contentType attribute

From: Umit Yalcinalp <umit.yalcinalp@oracle.com>
Date: Fri, 10 Sep 2004 16:54:59 -0700
Message-ID: <41423ED3.2090907@oracle.com>
To: public-ws-media-types@w3.org, WS Description List <www-ws-desc@w3.org>

Folks,

While we were adding a couple of new examples to the media-types note 
[1], we encountered the following issue.

Currently, we are saying that contentType attribute is optional. 
However, we don't have any guidelines as to when it can be completely 
omitted and when it must be present. It appears that more clarifications 
on this aspect is needed.

For example, if expectedMediaType="image/jpeg", meaning the value is 
static, does not include wildcards, one may presumably  omit the 
contentType attribute declaration as expected media type is fixed. 
However, if the expectedMediaType allows wildcards, one would expect the 
contentType attribute to be present.

The cases where the attributes can occur in the schema are as follows: 
(+) indicates it is present (-) indicates it is not present for the 
same  data.

(1)

+ expectedMediaType
- contentType

(2)
+ expectedMediaType
+ contentType

(3)
- expectedMediaType
+ contentType

(4) neither of them occur in the schema.

The cases (1) and (3) are particularly interesting and require a bit 
more clarification. Please note that the relationship between the actual 
content or the mismatch of attribute values are orthogonal issues that 
we have already resolved for (2).

There are couple of ways to tackle tightening of the spec on this issue:

-- We may require using contentType attribute when media types note is 
utilized. (A bit restrictive in my opinion). Does not allow (1)

or

-- We may require using the contentType attribute in conjunction with an 
expectedMediaType declaration that allows wildcards but allow it to be 
optional otherwise. Note that the contentType attribute can be used 
without the expectedMediaType attribute in conjunction with base64Binary 
or hexBinary data with this clarification, thus allowing (3). I think 
this requirement will cover the cases above.

If there are any other options, that will be good to get them on the 
table for f2f.

Cheers,


--umit

[1] http://www.w3.org/TR/xml-media-types/

-- 
Umit Yalcinalp                                  
Consulting Member of Technical Staff
ORACLE
Phone: +1 650 607 6154                          
Email: umit.yalcinalp@oracle.com
Received on Friday, 10 September 2004 23:55:37 GMT

This archive was generated by hypermail 2.2.0 + w3c-0.29 : Thursday, 13 January 2005 12:08:52 GMT