- From: Anish.Karmarkar <akarmark@dev.w3.org>
- Date: Wed, 15 Sep 2004 07:30:08 +0000
- To: public-ws-desc-eds@w3.org
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 **** <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:tns="http://example.com/thisexample" targetNamespace="http://example.com/thisexample"> ! <xs:import namespace="&xmlmimens;" ! schemaLocation="&xmlmimens;"/> ! ! ! <xs:complexType name="Picture"> ! <xs:simpleContent> ! <xs:extension base="xs:base64Binary" > ! <xs:attribute ref="xmlmime:contentType" use="optional" /> ! </xs:extension> ! </xs:simpleContent> ! </xs:complexType> ! </xs:element name="companyPicture" type="tns:Picture"/> </xs:schema> --- 397,410 ---- <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:tns="http://example.com/thisexample" + xmlns:xmlmime="&xmlmimens;" targetNamespace="http://example.com/thisexample"> ! <xs:import namespace="&xmlmimens;" ! schemaLocation="&xmlmimens;"/> ! <!-- This element has binary content and allows the contentType ! attribute that indicates the media type of the binary content --> ! <xs:element name="MyBinaryData" ! type="xmlmime:base64Binary"/> </xs:schema> *************** *** 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="http://example.com/thisexample"> ! <xs:import namespace="&xmlmimens;" ! schemaLocation="&xmlmimens;"/> ! <xs:complexType name="Picture"> ! <xs:simpleContent> ! <xs:extension base="xs:base64Binary" > ! <xs:attribute ref="xmlmime:contentType" use="optional" /> ! </xs:extension> ! </xs:simpleContent> ! </xs:complexType> ! <!-- This element designates the range of values ! that the declared binary type will accept --> ! <xs:element name="companyPicture" type="tns:Picture" ! xmlmime:expectedMediaType="image/*"/> ! </xs:element> </xs:schema> --- 444,464 ---- targetNamespace="http://example.com/thisexample"> ! <xs:import namespace="&xmlmimens;" ! schemaLocation="&xmlmimens;"/> ! <xs:complexType name="pictureType"> ! <xs:simpleContent> ! <xs:restriction base="xmlmime:base64Binary" > ! <xs:attribute ref="xmlmime:contentType" use="required" /> ! </xs:restriction> ! </xs:simpleContent> ! </xs:complexType> ! <!-- This element designates the range of values ! that the element definition will accept --> ! <xs:element name="Picture" type="tns:pictureType" ! xmlmime:expectedMediaType="image/*"/> ! </xs:element> </xs:schema> *************** *** 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="http://example.com/thisexample"> ! <xs:import namespace="&xmlmimens;" ! schemaLocation="&xmlmimens;"/> ! <xs:complexType name="Picture"> ! xmlmime:expectedMediaType="image/jpeg"/> ! <xs:simpleContent> ! <xs:extension base="xs:base64Binary"/> ! </xs:simpleContent> ! </xs:complexType> ! <xs:element name="myPicture" type="tns:Picture"/> </xs:schema> --- 497,514 ---- targetNamespace="http://example.com/thisexample"> ! <xs:import namespace="&xmlmimens;" ! schemaLocation="&xmlmimens;"/> ! <xs:complexType name="jpegPictureType"> ! xmlmime:expectedMediaType="image/jpeg"/> ! <xs:simpleContent> ! <xs:restriction base="xmlmime:base64Binary"/> ! <xs:attribute ref="xmlmime:contentType" use="prohibited" /> ! </xs:restriction> ! </xs:simpleContent> ! </xs:complexType> ! <xs:element name="JpegPicture" type="tns:JpegPictureType"/> </xs:schema> *************** *** 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="http://example.com/thisexample"> ! <xs:import namespace="&xmlmimens;" ! schemaLocation="&xmlmimens;"/> ! <xs:complexType name="Picture"> ! <xs:simpleContent> ! <xs:extension base="xs:base64Binary" > ! <xs:attribute ref="xmlmime:contentType" use="optional" /> ! </xs:extension> ! </xs:simpleContent> ! </xs:complexType> ! <xs:element name="groupPicture" type="tns:Picture"/> </xs:schema> --- 533,550 ---- targetNamespace="http://example.com/thisexample"> ! <xs:import namespace="&xmlmimens;" ! schemaLocation="&xmlmimens;"/> ! <xs:complexType name="jpegPreferredPictureType"> ! <xs:simpleContent> ! <xs:restriction base="xmlmime:base64Binary" > ! <xs:attribute ref="xmlmime:contentType" use="required" /> ! </xs:restriction> ! </xs:simpleContent> ! </xs:complexType> ! <xs:element name="jpegPeferredPicture" type="tns:jpegPreferredPictureType" ! xmlmime:acceptedMediaType="image/jpeg;q=1.0 image/tiff;q=0.8"/> </xs:schema> *************** *** 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 **** <xs:restriction base="xs:string" > <xs:pattern value="(text|application|image|audio|video|model|x-[-.a-z0-9]+)/ ! (([a-z0-9][-.+a-z0-9]+)|\*)" /> </xs:restriction> </xs:simpleType> </xs:schema> --- 725,748 ---- <xs:restriction base="xs:string" > <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})))?" /> </xs:restriction> </xs:simpleType> + <xs:complexType name="base64Binary" > + <xs:simpleContent> + <xs:extension base="xs:base64Binary" > + <xs:attribute ref="tns:contentType" /> + </xs:extension> + </xs:simpleContent> + </xs:complexType> + + <xs:complexType name="hexBinary" > + <xs:simpleContent> + <xs:extension base="xs:hexBinary" > + <xs:attribute ref="tns:contentType" /> + </xs:extension> + </xs:simpleContent> + </xs:complexType> + </xs:schema> 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 **** 3.1 <a href="#role">Role of expectedMediaType Schema annotation attribute</a><br> 4 <a href="#more-ex">Examples</a><br> ! 4.1 <a href="#static">Using a statically known media-type</a><br> ! 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 ---- 3.1 <a href="#role">Role of expectedMediaType Schema annotation attribute</a><br> 4 <a href="#more-ex">Examples</a><br> ! 4.1 <a href="#static">Binary data with known media type</a><br> ! 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> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:tns="http://example.com/thisexample" targetNamespace="http://example.com/thisexample"> ! <xs:import namespace="http://www.w3.org/@@@@/@@/xmlmime" ! schemaLocation="http://www.w3.org/@@@@/@@/xmlmime"/> ! ! ! <xs:complexType name="Picture"> ! <xs:simpleContent> ! <xs:extension base="xs:base64Binary" > ! <xs:attribute ref="xmlmime:contentType" use="optional" /> ! </xs:extension> ! </xs:simpleContent> ! </xs:complexType> ! </xs:element name="companyPicture" type="tns:Picture"/> </xs:schema> --- 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> <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"> ! <xs:import namespace="http://www.w3.org/@@@@/@@/xmlmime" ! schemaLocation="http://www.w3.org/@@@@/@@/xmlmime"/> ! <!-- This element has binary content and allows the contentType ! attribute that indicates the media type of the binary content --> ! <xs:element name="MyBinaryData" ! type="xmlmime:base64Binary"/> </xs:schema> *************** *** 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"> ! <xs:import namespace="http://www.w3.org/@@@@/@@/xmlmime" ! schemaLocation="http://www.w3.org/@@@@/@@/xmlmime"/> ! <xs:complexType name="Picture"> ! <xs:simpleContent> ! <xs:extension base="xs:base64Binary" > ! <xs:attribute ref="xmlmime:contentType" use="optional" /> ! </xs:extension> ! </xs:simpleContent> ! </xs:complexType> ! <!-- This element designates the range of values ! that the declared binary type will accept --> ! <xs:element name="companyPicture" type="tns:Picture" ! xmlmime:expectedMediaType="image/*"/> ! </xs:element> </xs:schema> --- 252,272 ---- targetNamespace="http://example.com/thisexample"> ! <xs:import namespace="http://www.w3.org/@@@@/@@/xmlmime" ! schemaLocation="http://www.w3.org/@@@@/@@/xmlmime"/> ! <xs:complexType name="pictureType"> ! <xs:simpleContent> ! <xs:restriction base="xmlmime:base64Binary" > ! <xs:attribute ref="xmlmime:contentType" use="required" /> ! </xs:restriction> ! </xs:simpleContent> ! </xs:complexType> ! <!-- This element designates the range of values ! that the element definition will accept --> ! <xs:element name="Picture" type="tns:pictureType" ! xmlmime:expectedMediaType="image/*"/> ! </xs:element> </xs:schema> *************** *** 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"> ! <xs:import namespace="http://www.w3.org/@@@@/@@/xmlmime" ! schemaLocation="http://www.w3.org/@@@@/@@/xmlmime"/> ! <xs:complexType name="Picture"> ! xmlmime:expectedMediaType="image/jpeg"/> ! <xs:simpleContent> ! <xs:extension base="xs:base64Binary"/> ! </xs:simpleContent> ! </xs:complexType> ! <xs:element name="myPicture" type="tns:Picture"/> </xs:schema> </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"> ! <xs:import namespace="http://www.w3.org/@@@@/@@/xmlmime" ! schemaLocation="http://www.w3.org/@@@@/@@/xmlmime"/> ! <xs:complexType name="jpegPictureType"> ! xmlmime:expectedMediaType="image/jpeg"/> ! <xs:simpleContent> ! <xs:restriction base="xmlmime:base64Binary"/> ! <xs:attribute ref="xmlmime:contentType" use="prohibited" /> ! </xs:restriction> ! </xs:simpleContent> ! </xs:complexType> ! <xs:element name="JpegPicture" type="tns:JpegPictureType"/> </xs:schema> </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"> ! <xs:import namespace="http://www.w3.org/@@@@/@@/xmlmime" ! schemaLocation="http://www.w3.org/@@@@/@@/xmlmime"/> ! <xs:complexType name="Picture"> ! <xs:simpleContent> ! <xs:extension base="xs:base64Binary" > ! <xs:attribute ref="xmlmime:contentType" use="optional" /> ! </xs:extension> ! </xs:simpleContent> ! </xs:complexType> ! <xs:element name="groupPicture" type="tns:Picture"/> </xs:schema> --- 319,336 ---- targetNamespace="http://example.com/thisexample"> ! <xs:import namespace="http://www.w3.org/@@@@/@@/xmlmime" ! schemaLocation="http://www.w3.org/@@@@/@@/xmlmime"/> ! <xs:complexType name="jpegPreferredPictureType"> ! <xs:simpleContent> ! <xs:restriction base="xmlmime:base64Binary" > ! <xs:attribute ref="xmlmime:contentType" use="required" /> ! </xs:restriction> ! </xs:simpleContent> ! </xs:complexType> ! <xs:element name="jpegPeferredPicture" type="tns:jpegPreferredPictureType" ! xmlmime:acceptedMediaType="image/jpeg;q=1.0 image/tiff;q=0.8"/> </xs:schema> *************** *** 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> <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> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" *************** *** 426,433 **** <xs:restriction base="xs:string" > <xs:pattern value="(text|application|image|audio|video|model|x-[-.a-z0-9]+)/ ! (([a-z0-9][-.+a-z0-9]+)|\*)" /> </xs:restriction> </xs:simpleType> </xs:schema> --- 427,450 ---- <xs:restriction base="xs:string" > <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})))?" /> </xs:restriction> </xs:simpleType> + <xs:complexType name="base64Binary" > + <xs:simpleContent> + <xs:extension base="xs:base64Binary" > + <xs:attribute ref="tns:contentType" /> + </xs:extension> + </xs:simpleContent> + </xs:complexType> + + <xs:complexType name="hexBinary" > + <xs:simpleContent> + <xs:extension base="xs:hexBinary" > + <xs:attribute ref="tns:contentType" /> + </xs:extension> + </xs:simpleContent> + </xs:complexType> + </xs:schema>
Received on Thursday, 16 September 2004 18:14:58 UTC