2002/ws/desc/media-types xml-media-types.xml,1.18,1.19 xml-media-types.html,1.10,1.11

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

Modified Files:
	xml-media-types.xml xml-media-types.html 
Log Message:
included decisions made on the 1st day of the Toronto F2F

Index: xml-media-types.xml
===================================================================
RCS file: /sources/public/2002/ws/desc/media-types/xml-media-types.xml,v
retrieving revision 1.18
retrieving revision 1.19
diff -C2 -d -r1.18 -r1.19
*** xml-media-types.xml	14 Sep 2004 06:24:50 -0000	1.18
--- xml-media-types.xml	15 Sep 2004 07:30:02 -0000	1.19
***************
*** 345,354 ****
          <att>expectedMediaType</att> attribute is similar to the value
          allowed for the 'Accept' header defined by HTTP 1.1
!         specification, Section 14.1 <bibref ref="rfc2616"/>.
        </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"/>.
        </p>
        
--- 345,359 ----
          <att>expectedMediaType</att> attribute is similar to the value
          allowed for the 'Accept' header defined by HTTP 1.1
!         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>
        
***************
*** 383,386 ****
--- 388,394 ----
          attribute does not changes the value of the element content.
        </p>
+       <p>For authoring convenience, two types <att>xmlmime:base64Binary</att>
+         and <att>xmlmime:hexBinary</att> are defined in <specref ref="appendix"/>
+       </p>
        <p>Example:</p>
  
***************
*** 389,407 ****
  &lt;xs:schema xmlns:xs=&quot;http://www.w3.org/2001/XMLSchema&quot;
             xmlns:tns=&quot;http://example.com/thisexample&quot;
             targetNamespace=&quot;http://example.com/thisexample&quot;&gt;
  
! &lt;xs:import namespace=&quot;&xmlmimens;&quot;
!     schemaLocation=&quot;&xmlmimens;&quot;/&gt;
! 
! 
! &lt;xs:complexType name=&quot;Picture&quot;&gt;
!    &lt;xs:simpleContent&gt;
!        &lt;xs:extension base=&quot;xs:base64Binary&quot; &gt;
!            &lt;xs:attribute ref=&quot;xmlmime:contentType&quot; use=&quot;optional&quot; /&gt;
!        &lt;/xs:extension&gt;
!    &lt;/xs:simpleContent&gt;
! &lt;/xs:complexType&gt;
  
! &lt;/xs:element name=&quot;companyPicture&quot; type=&quot;tns:Picture&quot;/&gt;
  
  &lt;/xs:schema&gt;
--- 397,410 ----
  &lt;xs:schema xmlns:xs=&quot;http://www.w3.org/2001/XMLSchema&quot;
             xmlns:tns=&quot;http://example.com/thisexample&quot;
+            xmlns:xmlmime=&quot;&xmlmimens;&quot;
             targetNamespace=&quot;http://example.com/thisexample&quot;&gt;
  
!     &lt;xs:import namespace=&quot;&xmlmimens;&quot;
!             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;
***************
*** 420,424 ****
        <p>Applications that need to specify expected media types SHOULD
          use the schema annotation to declare the range of expected
!         values.  The annotation should be considered only as a hint.
          <att>expectedMediaType</att> annotation attribute MAY be used in 
          conjunction with the declaration of &BEII;s or with complex type
--- 423,427 ----
        <p>Applications that need to specify expected media types SHOULD
          use the schema annotation to declare the range of expected
!         values.
          <att>expectedMediaType</att> annotation attribute MAY be used in 
          conjunction with the declaration of &BEII;s or with complex type
***************
*** 441,461 ****
             targetNamespace=&quot;http://example.com/thisexample&quot;&gt;
  
! &lt;xs:import namespace=&quot;&xmlmimens;&quot;
!     schemaLocation=&quot;&xmlmimens;&quot;/&gt;
  
  
! &lt;xs:complexType name=&quot;Picture&quot;&gt;
!    &lt;xs:simpleContent&gt;
!        &lt;xs:extension base=&quot;xs:base64Binary&quot; &gt;
!            &lt;xs:attribute ref=&quot;xmlmime:contentType&quot; use=&quot;optional&quot; /&gt;
!        &lt;/xs:extension&gt;
!    &lt;/xs:simpleContent&gt;
! &lt;/xs:complexType&gt;
  
! &lt;!-- This element designates the range of values 
!      that the declared binary type will accept    --&gt;
! &lt;xs:element name=&quot;companyPicture&quot; type=&quot;tns:Picture&quot; 
!         xmlmime:expectedMediaType=&quot;image/*&quot;/&gt; 
! &lt;/xs:element&gt;
  
  &lt;/xs:schema&gt;
--- 444,464 ----
             targetNamespace=&quot;http://example.com/thisexample&quot;&gt;
  
!     &lt;xs:import namespace=&quot;&xmlmimens;&quot;
!             schemaLocation=&quot;&xmlmimens;&quot;/&gt;
  
  
!     &lt;xs:complexType name=&quot;pictureType&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;required&quot; /&gt;
!            &lt;/xs:restriction&gt;
!        &lt;/xs:simpleContent&gt;
!     &lt;/xs:complexType&gt;
  
!     &lt;!-- This element designates the range of values 
!          that the element definition will accept    --&gt;
!     &lt;xs:element name=&quot;Picture&quot; type=&quot;tns:pictureType&quot; 
!             xmlmime:expectedMediaType=&quot;image/*&quot;/&gt; 
!     &lt;/xs:element&gt;
  
  &lt;/xs:schema&gt;
***************
*** 471,475 ****
       <head>Examples</head>
       <div2 id="static">
!      <head>Using a statically known media-type</head> 
  
      <p> Below is an
--- 474,478 ----
       <head>Examples</head>
       <div2 id="static">
!        <head>Binary data with known media type</head> 
  
      <p> Below is an
***************
*** 483,487 ****
       the content is expected to adhere to the
       <att>expectedMediaType</att> annotation value and its value is
!      static, the application does not utilize the optional <att>contentType</att>
       attribute.
       </p>
--- 486,490 ----
       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>
***************
*** 494,509 ****
             targetNamespace=&quot;http://example.com/thisexample&quot;&gt;
  
! &lt;xs:import namespace=&quot;&xmlmimens;&quot;
!     schemaLocation=&quot;&xmlmimens;&quot;/&gt;
  
  
! &lt;xs:complexType name=&quot;Picture&quot;&gt;
!        xmlmime:expectedMediaType=&quot;image/jpeg&quot;/&gt; 
!    &lt;xs:simpleContent&gt;
!        &lt;xs:extension base=&quot;xs:base64Binary&quot;/&gt;
!    &lt;/xs:simpleContent&gt;
! &lt;/xs:complexType&gt;
  
! &lt;xs:element name=&quot;myPicture&quot; type=&quot;tns:Picture&quot;/&gt;
  
  &lt;/xs:schema&gt;
--- 497,514 ----
             targetNamespace=&quot;http://example.com/thisexample&quot;&gt;
  
!     &lt;xs:import namespace=&quot;&xmlmimens;&quot;
!             schemaLocation=&quot;&xmlmimens;&quot;/&gt;
  
  
!     &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;
  
  &lt;/xs:schema&gt;
***************
*** 513,528 ****
       </div2>
  
!      <div2 id="anythinggoes">
!      <head>Unknown media type</head>
! 
!      <p>This example illustrates that the media type of binary data
!      is not known in advance but will be designated by the
!      document. 
!      </p>
  
!      <p>In this case, the Schema annotation
!      <att>expectedMediaType</att> is not utilized in the schema, but
!      the <att>contentType</att> attribute, whose value in the document will designate
!      the actual content in the document, is declared.
       </p>
  
--- 518,527 ----
       </div2>
  
!      <div2 id="example-with-q-param">
!      <head>Binary data with preferred media type</head>
  
!      <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>
  
***************
*** 534,550 ****
             targetNamespace=&quot;http://example.com/thisexample&quot;&gt;
  
! &lt;xs:import namespace=&quot;&xmlmimens;&quot;
!     schemaLocation=&quot;&xmlmimens;&quot;/&gt;
  
  
! &lt;xs:complexType name=&quot;Picture&quot;&gt;
!    &lt;xs:simpleContent&gt;
!        &lt;xs:extension base=&quot;xs:base64Binary&quot; &gt;
!            &lt;xs:attribute ref=&quot;xmlmime:contentType&quot; use=&quot;optional&quot; /&gt;
!        &lt;/xs:extension&gt;
!    &lt;/xs:simpleContent&gt;
! &lt;/xs:complexType&gt;
  
! &lt;xs:element name=&quot;groupPicture&quot; type=&quot;tns:Picture&quot;/&gt; 
  
  &lt;/xs:schema&gt;
--- 533,550 ----
             targetNamespace=&quot;http://example.com/thisexample&quot;&gt;
  
!     &lt;xs:import namespace=&quot;&xmlmimens;&quot;
!         schemaLocation=&quot;&xmlmimens;&quot;/&gt;
  
  
!     &lt;xs:complexType name=&quot;jpegPreferredPictureType&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;required&quot; /&gt;
!             &lt;/xs:restriction&gt;
!         &lt;/xs:simpleContent&gt;
!     &lt;/xs:complexType&gt;
  
!     &lt;xs:element name=&quot;jpegPeferredPicture&quot; type=&quot;tns:jpegPreferredPictureType&quot;
!             xmlmime:acceptedMediaType=&quot;image/jpeg;q=1.0 image/tiff;q=0.8&quot;/&gt; 
  
  &lt;/xs:schema&gt;
***************
*** 694,701 ****
  
         <div1 id="appendix">
!        <head>Appendix Attribute Schema</head>
  
         <note><p>The following definitions are taken from <bibref ref="paswa"/>.</p>
         </note>
  
  <eg xml:space="preserve">
--- 694,703 ----
  
         <div1 id="appendix">
!        <head>Appendix Schema</head>
  
+        <!--
         <note><p>The following definitions are taken from <bibref ref="paswa"/>.</p>
         </note>
+        -->
  
  <eg xml:space="preserve">
***************
*** 723,730 ****
      &lt;xs:restriction base=&quot;xs:string&quot; &gt;
          &lt;xs:pattern value=&quot;(text|application|image|audio|video|model|x-[-.a-z0-9]+)/
!                (([a-z0-9][-.+a-z0-9]+)|\*)&quot; /&gt;
      &lt;/xs:restriction&gt;
  &lt;/xs:simpleType&gt;
  
  &lt;/xs:schema&gt;
  
--- 725,748 ----
      &lt;xs:restriction base=&quot;xs:string&quot; &gt;
          &lt;xs:pattern value=&quot;(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})))?&quot; /&gt;
      &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;
+ &lt;/xs:complexType&gt;
+ 
+ &lt;xs:complexType name=&quot;hexBinary&quot; &gt;
+     &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;
+ &lt;/xs:complexType&gt;
+ 
  &lt;/xs:schema&gt;
  

Index: xml-media-types.html
===================================================================
RCS file: /sources/public/2002/ws/desc/media-types/xml-media-types.html,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -d -r1.10 -r1.11
*** xml-media-types.html	14 Sep 2004 06:24:50 -0000	1.10
--- xml-media-types.html	15 Sep 2004 07:30:02 -0000	1.11
***************
*** 100,109 ****
  &nbsp;&nbsp;&nbsp;&nbsp;3.1 <a href="#role">Role of expectedMediaType Schema annotation attribute</a><br>
  4 <a href="#more-ex">Examples</a><br>
! &nbsp;&nbsp;&nbsp;&nbsp;4.1 <a href="#static">Using a statically known media-type</a><br>
! &nbsp;&nbsp;&nbsp;&nbsp;4.2 <a href="#anythinggoes">Unknown media type</a><br>
  5 <a href="#references">References</a><br>
  </p>
  <h3><a id="appendices" name="appendices"></a>Appendices</h3><p class="toc">A <a href="#ack">Acknowledgements</a><br>
! B <a href="#appendix">Appendix Attribute Schema</a><br>
  </p></div><hr><div class="body"><div class="div1">
  <h2><a id="introduction" name="introduction"></a>1 Introduction</h2><p>
--- 100,109 ----
  &nbsp;&nbsp;&nbsp;&nbsp;3.1 <a href="#role">Role of expectedMediaType Schema annotation attribute</a><br>
  4 <a href="#more-ex">Examples</a><br>
! &nbsp;&nbsp;&nbsp;&nbsp;4.1 <a href="#static">Binary data with known media type</a><br>
! &nbsp;&nbsp;&nbsp;&nbsp;4.2 <a href="#example-with-q-param">Binary data with preferred media type</a><br>
  5 <a href="#references">References</a><br>
  </p>
  <h3><a id="appendices" name="appendices"></a>Appendices</h3><p class="toc">A <a href="#ack">Acknowledgements</a><br>
! B <a href="#appendix">Appendix Schema</a><br>
  </p></div><hr><div class="body"><div class="div1">
  <h2><a id="introduction" name="introduction"></a>1 Introduction</h2><p>
***************
*** 187,194 ****
          <code>expectedMediaType</code> attribute is similar to the value
          allowed for the 'Accept' header defined by HTTP 1.1
!         specification, Section 14.1 <a href="#rfc2616">[IETF RFC 2616]</a>.
        </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>.
        </p><p>The <code>expectedMediaType</code> attribute is intended to be used
          as part of a Schema annotation for a <em>binary element information item</em> declaration (see <a href="#usage"><b>3 Declaring media types for binary data</b></a>). 
--- 187,199 ----
          <code>expectedMediaType</code> attribute is similar to the value
          allowed for the 'Accept' header defined by HTTP 1.1
!         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
          as part of a Schema annotation for a <em>binary element information item</em> declaration (see <a href="#usage"><b>3 Declaring media types for binary data</b></a>). 
***************
*** 204,226 ****
          be considered as meta-data. The presence of the <code>contentType</code>
          attribute does not changes the value of the element content.
        </p><p>Example:</p><div class="exampleInner"><pre>
  
  &lt;xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
             xmlns:tns="http://example.com/thisexample"
             targetNamespace="http://example.com/thisexample"&gt;
  
! &lt;xs:import namespace="http://www.w3.org/@@@@/@@/xmlmime"
!     schemaLocation="http://www.w3.org/@@@@/@@/xmlmime"/&gt;
! 
! 
! &lt;xs:complexType name="Picture"&gt;
!    &lt;xs:simpleContent&gt;
!        &lt;xs:extension base="xs:base64Binary" &gt;
!            &lt;xs:attribute ref="xmlmime:contentType" use="optional" /&gt;
!        &lt;/xs:extension&gt;
!    &lt;/xs:simpleContent&gt;
! &lt;/xs:complexType&gt;
  
! &lt;/xs:element name="companyPicture" type="tns:Picture"/&gt;
  
  &lt;/xs:schema&gt;
--- 209,228 ----
          be considered as meta-data. The presence of the <code>contentType</code>
          attribute does not changes the value of the element content.
+       </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"
             xmlns:tns="http://example.com/thisexample"
+            xmlns:xmlmime="http://www.w3.org/@@@@/@@/xmlmime"
             targetNamespace="http://example.com/thisexample"&gt;
  
!     &lt;xs:import namespace="http://www.w3.org/@@@@/@@/xmlmime"
!             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;
***************
*** 233,237 ****
        </p><p>Applications that need to specify expected media types SHOULD
          use the schema annotation to declare the range of expected
!         values.  The annotation should be considered only as a hint.
          <code>expectedMediaType</code> annotation attribute MAY be used in 
          conjunction with the declaration of <em>binary element information item</em>s or with complex type
--- 235,239 ----
        </p><p>Applications that need to specify expected media types SHOULD
          use the schema annotation to declare the range of expected
!         values.
          <code>expectedMediaType</code> annotation attribute MAY be used in 
          conjunction with the declaration of <em>binary element information item</em>s or with complex type
***************
*** 250,270 ****
             targetNamespace="http://example.com/thisexample"&gt;
  
! &lt;xs:import namespace="http://www.w3.org/@@@@/@@/xmlmime"
!     schemaLocation="http://www.w3.org/@@@@/@@/xmlmime"/&gt;
  
  
! &lt;xs:complexType name="Picture"&gt;
!    &lt;xs:simpleContent&gt;
!        &lt;xs:extension base="xs:base64Binary" &gt;
!            &lt;xs:attribute ref="xmlmime:contentType" use="optional" /&gt;
!        &lt;/xs:extension&gt;
!    &lt;/xs:simpleContent&gt;
! &lt;/xs:complexType&gt;
  
! &lt;!-- This element designates the range of values 
!      that the declared binary type will accept    --&gt;
! &lt;xs:element name="companyPicture" type="tns:Picture" 
!         xmlmime:expectedMediaType="image/*"/&gt; 
! &lt;/xs:element&gt;
  
  &lt;/xs:schema&gt;
--- 252,272 ----
             targetNamespace="http://example.com/thisexample"&gt;
  
!     &lt;xs:import namespace="http://www.w3.org/@@@@/@@/xmlmime"
!             schemaLocation="http://www.w3.org/@@@@/@@/xmlmime"/&gt;
  
  
!     &lt;xs:complexType name="pictureType"&gt;
!        &lt;xs:simpleContent&gt;
!            &lt;xs:restriction base="xmlmime:base64Binary" &gt;
!                &lt;xs:attribute ref="xmlmime:contentType" use="required" /&gt;
!            &lt;/xs:restriction&gt;
!        &lt;/xs:simpleContent&gt;
!     &lt;/xs:complexType&gt;
  
!     &lt;!-- This element designates the range of values 
!          that the element definition will accept    --&gt;
!     &lt;xs:element name="Picture" type="tns:pictureType" 
!             xmlmime:expectedMediaType="image/*"/&gt; 
!     &lt;/xs:element&gt;
  
  &lt;/xs:schema&gt;
***************
*** 272,276 ****
  </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 Using a statically known media-type</h3><p> Below is an
       example for using binary data whose media type is known in
       advance to be "image/jpeg". 
--- 274,278 ----
  </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
       example for using binary data whose media type is known in
       advance to be "image/jpeg". 
***************
*** 280,284 ****
       the content is expected to adhere to the
       <code>expectedMediaType</code> annotation value and its value is
!      static, the application does not utilize the optional <code>contentType</code>
       attribute.
       </p><div class="exampleInner"><pre>
--- 282,286 ----
       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>
***************
*** 289,315 ****
             targetNamespace="http://example.com/thisexample"&gt;
  
! &lt;xs:import namespace="http://www.w3.org/@@@@/@@/xmlmime"
!     schemaLocation="http://www.w3.org/@@@@/@@/xmlmime"/&gt;
  
  
! &lt;xs:complexType name="Picture"&gt;
!        xmlmime:expectedMediaType="image/jpeg"/&gt; 
!    &lt;xs:simpleContent&gt;
!        &lt;xs:extension base="xs:base64Binary"/&gt;
!    &lt;/xs:simpleContent&gt;
! &lt;/xs:complexType&gt;
  
! &lt;xs:element name="myPicture" type="tns:Picture"/&gt;
  
  &lt;/xs:schema&gt;
  
  </pre></div></div><div class="div2">
! <h3><a id="anythinggoes" name="anythinggoes"></a>4.2 Unknown media type</h3><p>This example illustrates that the media type of binary data
!      is not known in advance but will be designated by the
!      document. 
!      </p><p>In this case, the Schema annotation
!      <code>expectedMediaType</code> is not utilized in the schema, but
!      the <code>contentType</code> attribute, whose value in the document will designate
!      the actual content in the document, is declared.
       </p><div class="exampleInner"><pre>
  
--- 291,315 ----
             targetNamespace="http://example.com/thisexample"&gt;
  
!     &lt;xs:import namespace="http://www.w3.org/@@@@/@@/xmlmime"
!             schemaLocation="http://www.w3.org/@@@@/@@/xmlmime"/&gt;
  
  
!     &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;
  
  &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>
  
***************
*** 319,335 ****
             targetNamespace="http://example.com/thisexample"&gt;
  
! &lt;xs:import namespace="http://www.w3.org/@@@@/@@/xmlmime"
!     schemaLocation="http://www.w3.org/@@@@/@@/xmlmime"/&gt;
  
  
! &lt;xs:complexType name="Picture"&gt;
!    &lt;xs:simpleContent&gt;
!        &lt;xs:extension base="xs:base64Binary" &gt;
!            &lt;xs:attribute ref="xmlmime:contentType" use="optional" /&gt;
!        &lt;/xs:extension&gt;
!    &lt;/xs:simpleContent&gt;
! &lt;/xs:complexType&gt;
  
! &lt;xs:element name="groupPicture" type="tns:Picture"/&gt; 
  
  &lt;/xs:schema&gt;
--- 319,336 ----
             targetNamespace="http://example.com/thisexample"&gt;
  
!     &lt;xs:import namespace="http://www.w3.org/@@@@/@@/xmlmime"
!         schemaLocation="http://www.w3.org/@@@@/@@/xmlmime"/&gt;
  
  
!     &lt;xs:complexType name="jpegPreferredPictureType"&gt;
!         &lt;xs:simpleContent&gt;
!             &lt;xs:restriction base="xmlmime: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 name="jpegPeferredPicture" type="tns:jpegPreferredPictureType"
!             xmlmime:acceptedMediaType="image/jpeg;q=1.0 image/tiff;q=0.8"/&gt; 
  
  &lt;/xs:schema&gt;
***************
*** 402,406 ****
         Mark Nottingham are gratefully acknowledged.
         </p></div><div class="div1">
! <h2><a id="appendix" name="appendix"></a>B Appendix Attribute Schema</h2><div class="note"><p class="prefix"><b>Note:</b></p><p>The following definitions are taken from <a href="#paswa">[PASWA]</a>.</p></div><div class="exampleInner"><pre>
  
  &lt;xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
--- 403,407 ----
         Mark Nottingham are gratefully acknowledged.
         </p></div><div class="div1">
! <h2><a id="appendix" name="appendix"></a>B Appendix Schema</h2><div class="exampleInner"><pre>
  
  &lt;xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
***************
*** 426,433 ****
      &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]+)|\*)" /&gt;
      &lt;/xs:restriction&gt;
  &lt;/xs:simpleType&gt;
  
  &lt;/xs:schema&gt;
  
--- 427,450 ----
      &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;
+ &lt;/xs:complexType&gt;
+ 
+ &lt;xs:complexType name="hexBinary" &gt;
+     &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;
+ &lt;/xs:complexType&gt;
+ 
  &lt;/xs:schema&gt;
  

Received on Thursday, 16 September 2004 18:14:58 UTC