W3C home > Mailing lists > Public > www-p3p-public-comments@w3.org > April 2000

P3P and XML Schemas

From: Martin J. Duerst <duerst@w3.org>
Date: Fri, 07 Apr 2000 14:10:19 +0900
Message-Id: <4.2.0.58.J.20000407134832.030d1590@sh.w3.mag.keio.ac.jp>
To: ht@cogsci.ed.ac.uk (Henry S. Thompson)
Cc: www-p3p-public-comments@w3.org, www-xml-schema-comments@w3.org
Sorry, my original mail had one of the addresses wrong,
I hope this is corrected now.

At 00/04/04 22:12 +0100, Henry S. Thompson wrote:

>"Martin J. Duerst" <duerst@w3.org> writes:
>
> > 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
>
>Not enough information here to know whether there's a problem or not.
>
>Modulo stale element names, your draft says what you say above you
>want, _provided_ you're happy that what you say above must occur in
>the order given:

But as far as I understand the P3P spec, it can be in any order,
so it looks like a problem.

The schema in the new draft has

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

whereas the example 3.1 in http://www.w3.org/TR/P3P/#encoding has
disputes-group before disclosure. However, the DTD (in the newest
draft, before, there was no DTD) http://www.w3.org/TR/P3P/#encoding
has it as a sequence:
      <!ELEMENT POLICY 
(ENTITY,DISCLOSURE,DISPUTES-GROUP?,STATEMENT+,EXTENSION*)>
so maybe the example is now wrong. On the other hand, the spec quite
early on (http://www.w3.org/TR/P3P/#About) clearly says:


The [ABNF] notation used in this specification is specified in RFC2234
and summarized in an Appendix. However, note that such
syntax is only a grammar representative of the XML syntax: all the
syntactic flexibilities of XML are also implicitly included; e.g.
whitespace rules, quoting using either single quote (') or double
quote ("), character escaping, comments, and case sensitivity. In
addition, note that attributes and elements may appear in any order.


So I think it's up to P3P to clarify this as quickly as possible:

- If you want arbitrary element order, change the DTD (it gets either
   much more complex or simple but very loose), and input your request
   to XML schema.

- If you are happy with fixed order, change the prose in the spec
   and check/change the examples.

On the XML schema side, if it's currently not possible to express
arbitrary order with occurrence constraints, that may be a problem
independent of whether P3P needs it; I'm sure there are other uses
where this is a requirement.


Regards,  Martin.


> > (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>
>
>If what you want is arbitrary order, just what do you mean by that,
>e.g. , is the following OK?
>
>  <extension>...</extension>
>  <statement>...</statement>
>  <disclosure>...</disclosure>
>  <statement>...</statement>
>  <extension>...</extension>
>  <statement>...</statement>
>
>ht
>--
>   Henry S. Thompson, HCRC Language Technology Group, University of Edinburgh
>           W3C Fellow 1999--2001, part-time member of W3C Team
>      2 Buccleuch Place, Edinburgh EH8 9LW, SCOTLAND -- (44) 131 650-4440
>             Fax: (44) 131 650-4587, e-mail: ht@cogsci.ed.ac.uk
>                      URL: http://www.ltg.ed.ac.uk/~ht/
>
>--
>   Henry S. Thompson, HCRC Language Technology Group, University of Edinburgh
>           W3C Fellow 1999--2001, part-time member of W3C Team
>      2 Buccleuch Place, Edinburgh EH8 9LW, SCOTLAND -- (44) 131 650-4440
>             Fax: (44) 131 650-4587, e-mail: ht@cogsci.ed.ac.uk
>                      URL: http://www.ltg.ed.ac.uk/~ht/
Received on Friday, 7 April 2000 01:24:42 GMT

This archive was generated by hypermail 2.2.0+W3C-0.1 : Tuesday, 21 September 2004 12:14:16 GMT