Problems with P3P XML schema

In a meeting here I just learned from Dave Raggett that
it seems to be wrong to assume that XML schemas can express
occurrence constraints on elements inside another element.

This would mean that the current P3P XML Schema is wrong,
and that facilities of XML Schema are inappropriate.

P3P WG, please check this out with the XML Schema WG,
and keep others informed.

Here is some data:

A P3P <policy> contains exactly one <disclosure>, at
least one <statement>, possibly a single disputes-group,
and possibly some extensions. The P3P schema tries to express
this as follows
(http://www.w3.org/TR/2000/WD-P3P-20000211/#Appendix_schema):

              <element name='policy'>
               <type>
                <attribute name='entity'>
                 <datatype basetype='STRING'
                </attribute>

                 <element ref='disclosure' minOccurs='1'/>
                 <element ref='disputes-group' minOccurs='0'/>
                 <element ref='statement' minOccurs='1' maxOccurs='*'/>
                 <element ref='extension' minOccurs='0' maxOccurs='*'/>

               </type>
              </element>

on the other hand, Dave Raggett, with the help of Henry Thomson,
editor of the XML Schema Structures spec, came up with the following
for HTML <head>:

<!-- one title and no more than one base -->
   <type name="head" source="html:common">
     <element ref="html:head.misc"
        minOccurs="0" maxOccurs="*" />

     <group order="choice">
       <group order="seq">
         <element ref="html:title" />

         <element ref="html:head.misc"
            minOccurs="0" maxOccurs="*" />

         <group order="seq" minOccurs="0">
           <element ref="html:base" />

           <element ref="html:head.misc"
              minOccurs="0" maxOccurs="*" />

         </group>
       </group>

       <group order="seq">
         <element ref="html:base" />

         <element ref="html:head.misc"
            minOccurs="0" maxOccurs="*" />

         <element ref="html:title" />

         <element ref="html:head.misc"
            minOccurs="0" maxOccurs="*" />
       </group>
     </group>
   </type>


Dave said that this cannot be simplified to something like:

              <element name='head' source="html:common">
               <type>
                <attribute name='entity'>
                 <datatype basetype='STRING'
                </attribute>

                 <element ref='html:base' minOccurs='0' maxOccurs='1'/>
                 <element ref='html:title' minOccurs='1' maxOccurs='1'/>
                 <element ref='html:head.misc' minOccurs='0' maxOccurs='*'/>

               </type>
              </element>


Please check this out!


Regards,   Martin.

Received on Tuesday, 4 April 2000 09:53:57 UTC