Annotations for media-type (opinion poll)

SOAP builders:

The WSDL group has been discussing how to annotate XML Schemas with
media types for elements which might be candidates for MTOM
optimization.  We have a draft [1] which describes how to do this, which
uses the following style of annotation:

<xs:element name="picture" type="myNS:image">
 <xs:annotation>
  <xs:appInfo>
   <xmlmime:expectedMediaType>image/*</xmlmime:expectedMediaType>
  </xs:appInfo>
 </xs:annotation>
</xs:element>

At a face-to-face in August, we discussed this alternate syntax, which
was in fact our original syntax before switching to appInfo:

<xs:element name="picture" type="myNS:image"
            xmlmime:expectedMediaType="image/*"/>

Clearly the second syntax is shorter/cleaner, and the group expressed a
preference for this version.  However, the question came up as to
whether commonly available schema toolkits would have more of a problem
processing the extension attribute on xs:element than they would with
processing an explicit xs:annotation element with appInfo content.  Note
that the schema spec [2] says that attributes and appInfo are both
explicit members of the annotations component.

After taking a quick peek through some common schema APIs (Xerces, and I
believe something from Microsoft) we came to the conclusion that
annotation support in general seems to be incomplete in the current
toolkits, and either version would be hard to deal with.  There was a
theory that if toolkits are going to need to change to better support
annotations, they shouldn't find it any harder to do attributes than
appInfo.

The question is - if/when you implement this, will it be any more
challenging for you to do either of the options above?  Do you have a
preference?

Thanks,
--Glen (on behalf of the WSDL WG)

[1] http://www.w3.org/TR/xml-media-types/
[2] http://www.w3.org/TR/xmlschema-1/#cAnnotations

Received on Friday, 10 September 2004 14:38:26 UTC