2002/ws/desc/media-types xml-media-types.xml,1.19,1.20 xml-media-types.html,1.11,1.12

Update of /sources/public/2002/ws/desc/media-types
In directory hutz:/tmp/cvs-serv19995

Modified Files:
	xml-media-types.xml xml-media-types.html 
Log Message:
ed issue resolution from f2f

Index: xml-media-types.xml
===================================================================
RCS file: /sources/public/2002/ws/desc/media-types/xml-media-types.xml,v
retrieving revision 1.19
retrieving revision 1.20
diff -C2 -d -r1.19 -r1.20
*** xml-media-types.xml	15 Sep 2004 07:30:02 -0000	1.19
--- xml-media-types.xml	23 Sep 2004 09:08:12 -0000	1.20
***************
*** 160,173 ****
  	<head>Introduction</head>
  	<p>
! 	Data sent and received over the Web typically uses the the
  	MIME media type defined by <bibref ref="rfc2046"/>, as the
! 	type system. For example, "image/jpeg", "application/pdf". As
! 	Web services get widely deployed, there is a need to indicate
! 	the media type of the XML element content in the messages sent and
  	received by Web services. There is also a need to express the
  	media type information using <bibref ref="XMLSchemaP2"/>, which
! 	is the type system used by <bibref ref="wsdl20part1"/> to describe Web
! 	services. This would allow Web services to utilize the widely
! 	deployed and supported MIME media type infrastructure.
  	</p>
  
--- 160,173 ----
  	<head>Introduction</head>
  	<p>
! 	Data sent and received over the Web typically uses the
  	MIME media type defined by <bibref ref="rfc2046"/>, as the
! 	type system. For example, "image/jpeg", "application/pdf". 
!   There is a need to indicate the media type of the XML element content, for
!   example, in messages sent and
  	received by Web services. There is also a need to express the
  	media type information using <bibref ref="XMLSchemaP2"/>, which
! 	is the type system used by <bibref ref="wsdl20part1"/>.
!   This would allow XML-based applications, such as Web services, to utilize 
!   the widely deployed and supported MIME media type infrastructure.
  	</p>
  
***************
*** 261,265 ****
  document addresses.</p>
  
!       <ulist>
        <item>
        <p> Define how to indicate the media type of an XML element
--- 261,265 ----
  document addresses.</p>
  
!       <olist>
        <item>
        <p> Define how to indicate the media type of an XML element
***************
*** 279,284 ****
  binary data represents an image, but leaves it to a document to
  further specify whether it is "jpeg", "gif", etc. This meta-data is
! used to indicate the set of media types the binary data may have and
! is not required to be present.
        </p>
        </item>
--- 279,283 ----
  binary data represents an image, but leaves it to a document to
  further specify whether it is "jpeg", "gif", etc. This meta-data is
! not required to be present.
        </p>
        </item>
***************
*** 293,297 ****
        </item>
  
!       </ulist>
  
        </div2>
--- 292,296 ----
        </item>
  
!       </olist>
  
        </div2>
***************
*** 347,358 ****
          specification, Section 14.1 <bibref ref="rfc2616"/>. The 'q'
          parameter defined by HTTP 1.1 specification, Section 3.9 
!         <bibref ref="rfc2616"/> is allowed, but other accept-parameters
          are not allowed.
        </p>
  
        <p>The value of the <att>contentType</att> attribute SHOULD be
        allowed by the <att>expectedMediaType</att>, if specified in the schema, as
        specified by <specref ref="usage"/>. When the expectedMediaType specifies
!       a wildcard or a list of acceptable media types, the schema SHOULD require
        the <att>contentType</att> attribute.
        </p>
--- 346,364 ----
          specification, Section 14.1 <bibref ref="rfc2616"/>. The 'q'
          parameter defined by HTTP 1.1 specification, Section 3.9 
!         <bibref ref="rfc2616"/> is allowed, but other accept-extensions
          are not allowed.
        </p>
  
+      <ednote>
+        <name>ASK</name>
+        <edtext>
+          The 'accept-extensions' of the HTTP 'Accept' header are not allowed in the 'expectedMediaType' attribute value. The WSD WG would like to solicit feedback on this.
+        </edtext>
+      </ednote>
+ 
        <p>The value of the <att>contentType</att> attribute SHOULD be
        allowed by the <att>expectedMediaType</att>, if specified in the schema, as
        specified by <specref ref="usage"/>. When the expectedMediaType specifies
!       a wildcard ("*") or a list of acceptable media types, the schema SHOULD require
        the <att>contentType</att> attribute.
        </p>
***************
*** 370,375 ****
        <p>Documents that want to specify additional media type
          information for binary data SHOULD denote this by using a &BEII;. 
!         A &BEII; is an &EII; defined with the following additional Infoset 
!         properties.
        </p>
  
--- 376,380 ----
        <p>Documents that want to specify additional media type
          information for binary data SHOULD denote this by using a &BEII;. 
!         A &BEII; is an &EII; defined with the following additional constraints.
        </p>
  
***************
*** 391,397 ****
          and <att>xmlmime:hexBinary</att> are defined in <specref ref="appendix"/>
        </p>
-       <p>Example:</p>
  
! <eg xml:space="preserve">
  
  &lt;xs:schema xmlns:xs=&quot;http://www.w3.org/2001/XMLSchema&quot;
--- 396,403 ----
          and <att>xmlmime:hexBinary</att> are defined in <specref ref="appendix"/>
        </p>
  
!       <example id="eg-ct-required">
!         <head>Element with binary content and contentType attribute</head>
!         <eg xml:space="preserve">
  
  &lt;xs:schema xmlns:xs=&quot;http://www.w3.org/2001/XMLSchema&quot;
***************
*** 403,414 ****
              schemaLocation=&quot;&xmlmimens;&quot;/&gt;
  
!     &lt;!-- This element has binary content and allows the contentType
           attribute that indicates the media type of the binary content --&gt;
!     &lt;xs:element name=&quot;MyBinaryData&quot;
!             type=&quot;xmlmime:base64Binary&quot;/&gt;
  
  &lt;/xs:schema&gt;
  
! </eg>
  
        <div2 id="role">
--- 409,428 ----
              schemaLocation=&quot;&xmlmimens;&quot;/&gt;
  
!     &lt;!-- This element has binary content and requires the contentType
           attribute that indicates the media type of the binary content --&gt;
!     &lt;xs:element name=&quot;MyBinaryData&quot;/&gt;
!       &lt;xs:complexType&gt;
!         &lt;xs:simpleContent&gt;
!           &lt;xs:restriction base=&quot;xs:base64Binary&quot; &gt;
!             &lt;xs:attribute ref=&quot;xmlmime:contentType&quot; use=&quot;required&quot;/&gt;
!           &lt;/xs:restriction&gt;
!         &lt;/xs:simpleContent&gt;
!       &lt;/xs:complexType&gt;
!     &lt;/xs:element&gt;
  
  &lt;/xs:schema&gt;
  
!         </eg>
!       </example>
  
        <div2 id="role">
***************
*** 417,422 ****
        <p>The <att>expectedMediaType</att> attribute is used for annotating
          the schema to indicate the expected range of values for 
!         <att>contentType</att> attribute only. The 
!         <att>expectedMediaType</att> attribute addresses Requirement (2).
        </p>
  
--- 431,435 ----
        <p>The <att>expectedMediaType</att> attribute is used for annotating
          the schema to indicate the expected range of values for 
!         <att>contentType</att> attribute only.
        </p>
  
***************
*** 429,433 ****
          or <emph>xs:hexBinary</emph> in XML Schema. If the
          <att>expectedMediaType</att> annotation attribute is used in 
!         both: the &BEII; declaration as well as definition of the complex type
          which the &BEII; belongs to, then the expected range of values defined
          for the &BEII; MUST be a subset of the expected range of values defined
--- 442,446 ----
          or <emph>xs:hexBinary</emph> in XML Schema. If the
          <att>expectedMediaType</att> annotation attribute is used in 
!         both the &BEII; declaration as well as definition of the complex type
          which the &BEII; belongs to, then the expected range of values defined
          for the &BEII; MUST be a subset of the expected range of values defined
***************
*** 435,441 ****
        </p>
  
!       <p>Example:</p>
! 
! <eg xml:space="preserve">
  
  &lt;xs:schema xmlns:xs=&quot;http://www.w3.org/2001/XMLSchema&quot;
--- 448,454 ----
        </p>
  
!       <example id="eg-wildcard">
!         <head>Element with binary content and expected media type of "image/*"</head>
!         <eg xml:space="preserve">
  
  &lt;xs:schema xmlns:xs=&quot;http://www.w3.org/2001/XMLSchema&quot;
***************
*** 464,468 ****
  &lt;/xs:schema&gt;
  
! </eg>
  
  
--- 477,482 ----
  &lt;/xs:schema&gt;
  
!         </eg>
!       </example>
  
  
***************
*** 483,494 ****
       <p>In this example, the application fixes the media type by
       declaring it with an annotation in conjunction with the complex
!      type declaration that specifies the specific binary data. Since
!      the content is expected to adhere to the
!      <att>expectedMediaType</att> annotation value and its value is
!      static, the application does not utilize the <att>contentType</att>
!      attribute.
       </p>
  
! <eg xml:space="preserve">
  
  &lt;xs:schema xmlns:xs=&quot;http://www.w3.org/2001/XMLSchema&quot;
--- 497,506 ----
       <p>In this example, the application fixes the media type by
       declaring it with an annotation in conjunction with the complex
!      type declaration that specifies the specific binary data.
       </p>
  
!       <example id="eg-static">
!         <head>Element with binary content and known media type</head>
!         <eg xml:space="preserve">
  
  &lt;xs:schema xmlns:xs=&quot;http://www.w3.org/2001/XMLSchema&quot;
***************
*** 501,512 ****
  
  
!     &lt;xs:complexType name=&quot;jpegPictureType&quot;&gt;
              xmlmime:expectedMediaType=&quot;image/jpeg&quot;/&gt; 
-         &lt;xs:simpleContent&gt;
-             &lt;xs:restriction base=&quot;xmlmime:base64Binary&quot;/&gt;
-                 &lt;xs:attribute ref=&quot;xmlmime:contentType&quot; use=&quot;prohibited&quot; /&gt;
-             &lt;/xs:restriction&gt;
-         &lt;/xs:simpleContent&gt;
-     &lt;/xs:complexType&gt;
  
      &lt;xs:element name=&quot;JpegPicture&quot; type=&quot;tns:JpegPictureType&quot;/&gt;
--- 513,519 ----
  
  
!     &lt;xs:complexType name=&quot;jpegPictureType&quot; 
!             type=&quot;xs:base64Binary&quot;
              xmlmime:expectedMediaType=&quot;image/jpeg&quot;/&gt; 
  
      &lt;xs:element name=&quot;JpegPicture&quot; type=&quot;tns:JpegPictureType&quot;/&gt;
***************
*** 514,518 ****
  &lt;/xs:schema&gt;
  
! </eg>
  
       </div2>
--- 521,526 ----
  &lt;/xs:schema&gt;
  
!         </eg>
!       </example>
  
       </div2>
***************
*** 526,530 ****
       </p>
  
! <eg xml:space="preserve">
  
  &lt;xs:schema xmlns:xs=&quot;http://www.w3.org/2001/XMLSchema&quot;
--- 534,540 ----
       </p>
  
!       <example id="eg-preferred">
!         <head>Element with binary content and preferred media type</head>
!         <eg xml:space="preserve">
  
  &lt;xs:schema xmlns:xs=&quot;http://www.w3.org/2001/XMLSchema&quot;
***************
*** 550,554 ****
  &lt;/xs:schema&gt;
  
! </eg>
  
       <ednote>
--- 560,565 ----
  &lt;/xs:schema&gt;
  
!         </eg>
!       </example>
  
       <ednote>
***************
*** 704,708 ****
  
  &lt;xs:schema xmlns:xs=&quot;http://www.w3.org/2001/XMLSchema&quot;
!            xmlns:tns=&quot;&xmlmimens;&quot;
             targetNamespace=&quot;&xmlmimens;&quot; &gt;
  
--- 715,719 ----
  
  &lt;xs:schema xmlns:xs=&quot;http://www.w3.org/2001/XMLSchema&quot;
!            xmlns:xmlmime=&quot;&xmlmimens;&quot;
             targetNamespace=&quot;&xmlmimens;&quot; &gt;
  
***************
*** 716,722 ****
  &lt;/xs:attribute&gt;
  
  &lt;xs:element name=&quot;expectedMediaType&quot; &gt;
      &lt;xs:simpleType&gt;
!       &lt;xs:list itemType=&quot;tns:expectedMediaTypeItem&quot; /&gt;
      &lt;/xs:simpleType&gt;
  &lt;/xs:element&gt;
--- 727,734 ----
  &lt;/xs:attribute&gt;
  
+ <!--
  &lt;xs:element name=&quot;expectedMediaType&quot; &gt;
      &lt;xs:simpleType&gt;
!       &lt;xs:list itemType=&quot;xmlmime:expectedMediaTypeItem&quot; /&gt;
      &lt;/xs:simpleType&gt;
  &lt;/xs:element&gt;
***************
*** 728,736 ****
      &lt;/xs:restriction&gt;
  &lt;/xs:simpleType&gt;
  
  &lt;xs:complexType name=&quot;base64Binary&quot; &gt;
      &lt;xs:simpleContent&gt;
          &lt;xs:extension base=&quot;xs:base64Binary&quot; &gt;
!             &lt;xs:attribute ref=&quot;tns:contentType&quot; /&gt;
          &lt;/xs:extension&gt;
      &lt;/xs:simpleContent&gt;
--- 740,751 ----
      &lt;/xs:restriction&gt;
  &lt;/xs:simpleType&gt;
+ -->
+ 
+ &lt;xs:element name=&quot;expectedMediaType&quot; type=&quot;xs:string&quot; &gt;
  
  &lt;xs:complexType name=&quot;base64Binary&quot; &gt;
      &lt;xs:simpleContent&gt;
          &lt;xs:extension base=&quot;xs:base64Binary&quot; &gt;
!             &lt;xs:attribute ref=&quot;xmlmime:contentType&quot; /&gt;
          &lt;/xs:extension&gt;
      &lt;/xs:simpleContent&gt;
***************
*** 740,744 ****
      &lt;xs:simpleContent&gt;
          &lt;xs:extension base=&quot;xs:hexBinary&quot; &gt;
!             &lt;xs:attribute ref=&quot;tns:contentType&quot; /&gt;
          &lt;/xs:extension&gt;
      &lt;/xs:simpleContent&gt;
--- 755,759 ----
      &lt;xs:simpleContent&gt;
          &lt;xs:extension base=&quot;xs:hexBinary&quot; &gt;
!             &lt;xs:attribute ref=&quot;xmlmime:contentType&quot; /&gt;
          &lt;/xs:extension&gt;
      &lt;/xs:simpleContent&gt;

Index: xml-media-types.html
===================================================================
RCS file: /sources/public/2002/ws/desc/media-types/xml-media-types.html,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -d -r1.11 -r1.12
*** xml-media-types.html	15 Sep 2004 07:30:02 -0000	1.11
--- xml-media-types.html	23 Sep 2004 09:08:12 -0000	1.12
***************
*** 108,121 ****
  </p></div><hr><div class="body"><div class="div1">
  <h2><a id="introduction" name="introduction"></a>1 Introduction</h2><p>
! 	Data sent and received over the Web typically uses the the
  	MIME media type defined by <a href="#rfc2046">[IETF RFC 2046]</a>, as the
! 	type system. For example, "image/jpeg", "application/pdf". As
! 	Web services get widely deployed, there is a need to indicate
! 	the media type of the XML element content in the messages sent and
  	received by Web services. There is also a need to express the
  	media type information using <a href="#XMLSchemaP2">[XML Schema: Datatypes]</a>, which
! 	is the type system used by <a href="#wsdl20part1">[WSDL 2.0 Part 1]</a> to describe Web
! 	services. This would allow Web services to utilize the widely
! 	deployed and supported MIME media type infrastructure.
  	</p><p><a href="#XOP">[XOP]</a> and <a href="#MTOM">[MTOM]</a> enables one to serialize 
    binary content (element content that is in a canonical lexical 
--- 108,121 ----
  </p></div><hr><div class="body"><div class="div1">
  <h2><a id="introduction" name="introduction"></a>1 Introduction</h2><p>
! 	Data sent and received over the Web typically uses the
  	MIME media type defined by <a href="#rfc2046">[IETF RFC 2046]</a>, as the
! 	type system. For example, "image/jpeg", "application/pdf". 
!   There is a need to indicate the media type of the XML element content, for
!   example, in messages sent and
  	received by Web services. There is also a need to express the
  	media type information using <a href="#XMLSchemaP2">[XML Schema: Datatypes]</a>, which
! 	is the type system used by <a href="#wsdl20part1">[WSDL 2.0 Part 1]</a>.
!   This would allow XML-based applications, such as Web services, to utilize 
!   the widely deployed and supported MIME media type infrastructure.
  	</p><p><a href="#XOP">[XOP]</a> and <a href="#MTOM">[MTOM]</a> enables one to serialize 
    binary content (element content that is in a canonical lexical 
***************
*** 154,158 ****
        </p></div><div class="div2">
  <h3><a id="requirements" name="requirements"></a>1.2 Requirements</h3><p>This section describes the set of requirements that this
! document addresses.</p><ul><li><p> Define how to indicate the media type of an XML element
  content whose type is <em>xs:base64Binary</em> or
  <em>xs:hexBinary</em>. This is meta-data that may be, but not
--- 154,158 ----
        </p></div><div class="div2">
  <h3><a id="requirements" name="requirements"></a>1.2 Requirements</h3><p>This section describes the set of requirements that this
! document addresses.</p><ol class="enumar"><li><p> Define how to indicate the media type of an XML element
  content whose type is <em>xs:base64Binary</em> or
  <em>xs:hexBinary</em>. This is meta-data that may be, but not
***************
*** 166,175 ****
  binary data represents an image, but leaves it to a document to
  further specify whether it is "jpeg", "gif", etc. This meta-data is
! used to indicate the set of media types the binary data may have and
! is not required to be present.
        </p></li><li><p>Define the acceptable format of media type values. </p></li><li><p>Define the relationship between the expected and the
  actual value of the media types declared for binary data in XML
  documents.
!       </p></li></ul></div></div><div class="div1">
  <h2><a id="declaration" name="declaration"></a>2 Attributes for Declaring Media Types</h2><p>This section defines two global <em>attribute information item</em>s for
  declaring the media type of binary data in XML Schema to address the
--- 166,174 ----
  binary data represents an image, but leaves it to a document to
  further specify whether it is "jpeg", "gif", etc. This meta-data is
! not required to be present.
        </p></li><li><p>Define the acceptable format of media type values. </p></li><li><p>Define the relationship between the expected and the
  actual value of the media types declared for binary data in XML
  documents.
!       </p></li></ol></div></div><div class="div1">
  <h2><a id="declaration" name="declaration"></a>2 Attributes for Declaring Media Types</h2><p>This section defines two global <em>attribute information item</em>s for
  declaring the media type of binary data in XML Schema to address the
***************
*** 189,198 ****
          specification, Section 14.1 <a href="#rfc2616">[IETF RFC 2616]</a>. The 'q'
          parameter defined by HTTP 1.1 specification, Section 3.9 
!         <a href="#rfc2616">[IETF RFC 2616]</a> is allowed, but other accept-parameters
          are not allowed.
!       </p><p>The value of the <code>contentType</code> attribute SHOULD be
        allowed by the <code>expectedMediaType</code>, if specified in the schema, as
        specified by <a href="#usage"><b>3 Declaring media types for binary data</b></a>. When the expectedMediaType specifies
!       a wildcard or a list of acceptable media types, the schema SHOULD require
        the <code>contentType</code> attribute.
        </p><p>The <code>expectedMediaType</code> attribute is intended to be used
--- 188,199 ----
          specification, Section 14.1 <a href="#rfc2616">[IETF RFC 2616]</a>. The 'q'
          parameter defined by HTTP 1.1 specification, Section 3.9 
!         <a href="#rfc2616">[IETF RFC 2616]</a> is allowed, but other accept-extensions
          are not allowed.
!       </p><table border="1" summary="Editorial note: ASK"><tr><td width="50%" valign="top" align="left"><b>Editorial note: ASK</b></td><td width="50%" valign="top" align="right">&nbsp;</td></tr><tr><td valign="top" align="left" colspan="2">
!          The 'accept-extensions' of the HTTP 'Accept' header are not allowed in the 'expectedMediaType' attribute value. The WSD WG would like to solicit feedback on this.
!        </td></tr></table><p>The value of the <code>contentType</code> attribute SHOULD be
        allowed by the <code>expectedMediaType</code>, if specified in the schema, as
        specified by <a href="#usage"><b>3 Declaring media types for binary data</b></a>. When the expectedMediaType specifies
!       a wildcard ("*") or a list of acceptable media types, the schema SHOULD require
        the <code>contentType</code> attribute.
        </p><p>The <code>expectedMediaType</code> attribute is intended to be used
***************
*** 201,206 ****
  <h2><a id="usage" name="usage"></a>3 Declaring media types for binary data</h2><p>Documents that want to specify additional media type
          information for binary data SHOULD denote this by using a <em>binary element information item</em>. 
!         A <em>binary element information item</em> is an <em>element information item</em> defined with the following additional Infoset 
!         properties.
        </p><ul><li><p>An OPTIONAL <code>contentType</code> <em>attribute information item</em> as described above in
  <a href="#contentType"><b>2.1 contentType attribute </b></a>.  </p></li><li><p>A type of the <em>binary element information item</em> must be a type derived from or equal to 
--- 202,206 ----
  <h2><a id="usage" name="usage"></a>3 Declaring media types for binary data</h2><p>Documents that want to specify additional media type
          information for binary data SHOULD denote this by using a <em>binary element information item</em>. 
!         A <em>binary element information item</em> is an <em>element information item</em> defined with the following additional constraints.
        </p><ul><li><p>An OPTIONAL <code>contentType</code> <em>attribute information item</em> as described above in
  <a href="#contentType"><b>2.1 contentType attribute </b></a>.  </p></li><li><p>A type of the <em>binary element information item</em> must be a type derived from or equal to 
***************
*** 211,215 ****
        </p><p>For authoring convenience, two types <code>xmlmime:base64Binary</code>
          and <code>xmlmime:hexBinary</code> are defined in <a href="#appendix"><b>B Appendix Schema</b></a>
!       </p><p>Example:</p><div class="exampleInner"><pre>
  
  &lt;xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
--- 211,216 ----
        </p><p>For authoring convenience, two types <code>xmlmime:base64Binary</code>
          and <code>xmlmime:hexBinary</code> are defined in <a href="#appendix"><b>B Appendix Schema</b></a>
!       </p><div class="exampleOuter">
! <div class="exampleHeader"><a id="eg-ct-required" name="eg-ct-required"></a>Example: Element with binary content and contentType attribute</div><div class="exampleInner"><pre>
  
  &lt;xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
***************
*** 221,236 ****
              schemaLocation="http://www.w3.org/@@@@/@@/xmlmime"/&gt;
  
!     &lt;!-- This element has binary content and allows the contentType
           attribute that indicates the media type of the binary content --&gt;
!     &lt;xs:element name="MyBinaryData"
!             type="xmlmime:base64Binary"/&gt;
  
  &lt;/xs:schema&gt;
  
! </pre></div><div class="div2">
  <h3><a id="role" name="role"></a>3.1 Role of expectedMediaType Schema annotation attribute</h3><p>The <code>expectedMediaType</code> attribute is used for annotating
          the schema to indicate the expected range of values for 
!         <code>contentType</code> attribute only. The 
!         <code>expectedMediaType</code> attribute addresses Requirement (2).
        </p><p>Applications that need to specify expected media types SHOULD
          use the schema annotation to declare the range of expected
--- 222,243 ----
              schemaLocation="http://www.w3.org/@@@@/@@/xmlmime"/&gt;
  
!     &lt;!-- This element has binary content and requires the contentType
           attribute that indicates the media type of the binary content --&gt;
!     &lt;xs:element name="MyBinaryData"/&gt;
!       &lt;xs:complexType&gt;
!         &lt;xs:simpleContent&gt;
!           &lt;xs:restriction base="xs:base64Binary" &gt;
!             &lt;xs:attribute ref="xmlmime:contentType" use="required"/&gt;
!           &lt;/xs:restriction&gt;
!         &lt;/xs:simpleContent&gt;
!       &lt;/xs:complexType&gt;
!     &lt;/xs:element&gt;
  
  &lt;/xs:schema&gt;
  
!         </pre></div></div><div class="div2">
  <h3><a id="role" name="role"></a>3.1 Role of expectedMediaType Schema annotation attribute</h3><p>The <code>expectedMediaType</code> attribute is used for annotating
          the schema to indicate the expected range of values for 
!         <code>contentType</code> attribute only.
        </p><p>Applications that need to specify expected media types SHOULD
          use the schema annotation to declare the range of expected
***************
*** 241,249 ****
          or <em>xs:hexBinary</em> in XML Schema. If the
          <code>expectedMediaType</code> annotation attribute is used in 
!         both: the <em>binary element information item</em> declaration as well as definition of the complex type
          which the <em>binary element information item</em> belongs to, then the expected range of values defined
          for the <em>binary element information item</em> MUST be a subset of the expected range of values defined
          for the complex type.
!       </p><p>Example:</p><div class="exampleInner"><pre>
  
  &lt;xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
--- 248,257 ----
          or <em>xs:hexBinary</em> in XML Schema. If the
          <code>expectedMediaType</code> annotation attribute is used in 
!         both the <em>binary element information item</em> declaration as well as definition of the complex type
          which the <em>binary element information item</em> belongs to, then the expected range of values defined
          for the <em>binary element information item</em> MUST be a subset of the expected range of values defined
          for the complex type.
!       </p><div class="exampleOuter">
! <div class="exampleHeader"><a id="eg-wildcard" name="eg-wildcard"></a>Example: Element with binary content and expected media type of "image/*"</div><div class="exampleInner"><pre>
  
  &lt;xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
***************
*** 272,276 ****
  &lt;/xs:schema&gt;
  
! </pre></div></div></div><div class="div1">
  <h2><a id="more-ex" name="more-ex"></a>4 Examples</h2><div class="div2">
  <h3><a id="static" name="static"></a>4.1 Binary data with known media type</h3><p> Below is an
--- 280,284 ----
  &lt;/xs:schema&gt;
  
!         </pre></div></div></div></div><div class="div1">
  <h2><a id="more-ex" name="more-ex"></a>4 Examples</h2><div class="div2">
  <h3><a id="static" name="static"></a>4.1 Binary data with known media type</h3><p> Below is an
***************
*** 279,288 ****
      </p><p>In this example, the application fixes the media type by
       declaring it with an annotation in conjunction with the complex
!      type declaration that specifies the specific binary data. Since
!      the content is expected to adhere to the
!      <code>expectedMediaType</code> annotation value and its value is
!      static, the application does not utilize the <code>contentType</code>
!      attribute.
!      </p><div class="exampleInner"><pre>
  
  &lt;xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
--- 287,293 ----
      </p><p>In this example, the application fixes the media type by
       declaring it with an annotation in conjunction with the complex
!      type declaration that specifies the specific binary data.
!      </p><div class="exampleOuter">
! <div class="exampleHeader"><a id="eg-static" name="eg-static"></a>Example: Element with binary content and known media type</div><div class="exampleInner"><pre>
  
  &lt;xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
***************
*** 295,306 ****
  
  
!     &lt;xs:complexType name="jpegPictureType"&gt;
              xmlmime:expectedMediaType="image/jpeg"/&gt; 
-         &lt;xs:simpleContent&gt;
-             &lt;xs:restriction base="xmlmime:base64Binary"/&gt;
-                 &lt;xs:attribute ref="xmlmime:contentType" use="prohibited" /&gt;
-             &lt;/xs:restriction&gt;
-         &lt;/xs:simpleContent&gt;
-     &lt;/xs:complexType&gt;
  
      &lt;xs:element name="JpegPicture" type="tns:JpegPictureType"/&gt;
--- 300,306 ----
  
  
!     &lt;xs:complexType name="jpegPictureType" 
!             type="xs:base64Binary"
              xmlmime:expectedMediaType="image/jpeg"/&gt; 
  
      &lt;xs:element name="JpegPicture" type="tns:JpegPictureType"/&gt;
***************
*** 308,316 ****
  &lt;/xs:schema&gt;
  
! </pre></div></div><div class="div2">
  <h3><a id="example-with-q-param" name="example-with-q-param"></a>4.2 Binary data with preferred media type</h3><p>This example illustrates that binary data with media type 'image/jpeg' is
         preffered but binary data with media type of 'image/tiff' is also
         allowed (with a lower preference).
!      </p><div class="exampleInner"><pre>
  
  &lt;xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
--- 308,317 ----
  &lt;/xs:schema&gt;
  
!         </pre></div></div></div><div class="div2">
  <h3><a id="example-with-q-param" name="example-with-q-param"></a>4.2 Binary data with preferred media type</h3><p>This example illustrates that binary data with media type 'image/jpeg' is
         preffered but binary data with media type of 'image/tiff' is also
         allowed (with a lower preference).
!      </p><div class="exampleOuter">
! <div class="exampleHeader"><a id="eg-preferred" name="eg-preferred"></a>Example: Element with binary content and preferred media type</div><div class="exampleInner"><pre>
  
  &lt;xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
***************
*** 336,340 ****
  &lt;/xs:schema&gt;
  
! </pre></div><table border="1" summary="Editorial note: ASK"><tr><td width="50%" valign="top" align="left"><b>Editorial note: ASK</b></td><td width="50%" valign="top" align="right">&nbsp;</td></tr><tr><td valign="top" align="left" colspan="2">
           This document addresses the requirements in 
           <a href="http://www.w3.org/2000/xp/Group/xmlp-issues#x443">Issue 443</a> of
--- 337,341 ----
  &lt;/xs:schema&gt;
  
!         </pre></div></div><table border="1" summary="Editorial note: ASK"><tr><td width="50%" valign="top" align="left"><b>Editorial note: ASK</b></td><td width="50%" valign="top" align="right">&nbsp;</td></tr><tr><td valign="top" align="left" colspan="2">
           This document addresses the requirements in 
           <a href="http://www.w3.org/2000/xp/Group/xmlp-issues#x443">Issue 443</a> of
***************
*** 406,410 ****
  
  &lt;xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
!            xmlns:tns="http://www.w3.org/@@@@/@@/xmlmime"
             targetNamespace="http://www.w3.org/@@@@/@@/xmlmime" &gt;
  
--- 407,411 ----
  
  &lt;xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
!            xmlns:xmlmime="http://www.w3.org/@@@@/@@/xmlmime"
             targetNamespace="http://www.w3.org/@@@@/@@/xmlmime" &gt;
  
***************
*** 418,438 ****
  &lt;/xs:attribute&gt;
  
- &lt;xs:element name="expectedMediaType" &gt;
-     &lt;xs:simpleType&gt;
-       &lt;xs:list itemType="tns:expectedMediaTypeItem" /&gt;
-     &lt;/xs:simpleType&gt;
- &lt;/xs:element&gt;
  
! &lt;xs:simpleType name="expectedMediaTypeItem" &gt;
!     &lt;xs:restriction base="xs:string" &gt;
!         &lt;xs:pattern value="(text|application|image|audio|video|model|x-[-.a-z0-9]+)/
!         (([a-z0-9][-.+a-z0-9]+)|\*)(;q=((0.[0-9]{1,3})|(1.[0]{1,3})))?" /&gt;
!     &lt;/xs:restriction&gt;
! &lt;/xs:simpleType&gt;
  
  &lt;xs:complexType name="base64Binary" &gt;
      &lt;xs:simpleContent&gt;
          &lt;xs:extension base="xs:base64Binary" &gt;
!             &lt;xs:attribute ref="tns:contentType" /&gt;
          &lt;/xs:extension&gt;
      &lt;/xs:simpleContent&gt;
--- 419,430 ----
  &lt;/xs:attribute&gt;
  
  
! 
! &lt;xs:element name="expectedMediaType" type="xs:string" &gt;
  
  &lt;xs:complexType name="base64Binary" &gt;
      &lt;xs:simpleContent&gt;
          &lt;xs:extension base="xs:base64Binary" &gt;
!             &lt;xs:attribute ref="xmlmime:contentType" /&gt;
          &lt;/xs:extension&gt;
      &lt;/xs:simpleContent&gt;
***************
*** 442,446 ****
      &lt;xs:simpleContent&gt;
          &lt;xs:extension base="xs:hexBinary" &gt;
!             &lt;xs:attribute ref="tns:contentType" /&gt;
          &lt;/xs:extension&gt;
      &lt;/xs:simpleContent&gt;
--- 434,438 ----
      &lt;xs:simpleContent&gt;
          &lt;xs:extension base="xs:hexBinary" &gt;
!             &lt;xs:attribute ref="xmlmime:contentType" /&gt;
          &lt;/xs:extension&gt;
      &lt;/xs:simpleContent&gt;

Received on Thursday, 23 September 2004 09:08:15 UTC