Re: [Bug 2506] XML Schema Support for <all> groups

The XML Schema 1.1 enhancements to xsd:all are a useful extension to  
the capability of XML Schema, and are sufficient to address my  
comments for now.

Regards, Steve

Steve Hanson
WebSphere Message Brokers
Hursley, UK
Internet: smh@uk.ibm.com
Phone (+44)/(0) 1962-815848


noah_mendelsohn@us.ibm.com
20/03/2007 20:44

To
Steve Hanson/UK/IBM@IBMGB, Robert Nielsen <robertnielsen@nc.rr.com>
cc
www-xml-schema-comments@w3.org
Subject
[Bug 2506] XML Schema Support for <all> groups





Gentlemen,

In 2005, both of you sent comments  [1,2]  requesting ehancements to the
support of <all> groups in the W3C XML Schema Language.  To track  
work on
the concerns you raised, the workgroup opened an "issue", which is  
number
2506 in our Bugzilla tracking system [3].  The purpose of this note  
is to
inform you of our intentions for changes to support for <all> groups in
XML Schema version 1.1, and to alert you to our intended disposition of
this issue.

As summarized in the Bugzilla formulation, several functional  
improvements
were requested.   Here is what is proposed for those in XML Schema 1.1:

 > 1. Allow maxOccurs>1 on elements inside <xs:all>

This will be provided.  maxOccurs>1 will be allowed on <xs:all> groups.

 > 1.1 And require that same named elements in the instance have to be
 > together (no interleaving). That is, A,A,B,B,B, instead of A,B,B,A.

This was discussed extensively, and the workgroup could not reach
consensus that the additional complexity in the specifications, in
implementations, in testing, and so on was justified by the added  
utility
of providing both options.  Accordingly, the validation rules when
maxOccurs>1 are what is described above as "interleaving".  If we have
a(maxOccurs=2) and b(maxOccurs=3) then both of the above are valid.

 > 2. Allow <xs:all> to appear inside <xs:sequence> and <xs:choice>

This was deemed sufficiently complicated to implement that the  
function is
not being provided in XML Schema 1.1

 > 3. Allow xs:all extensions, to add new elements into all model  
groups.

This is supported in XML Schema 1.1.  When extension of an <all>  
group is
used an an XML Schema document, then only the "new" elements must be
explicitly identified on the specification of the derived type.  Others
are inherited from the base.

Although not explicitly requested in your notes, and not tracked  
under the
same bugzilla bug number, Schema 1.1 also includes significant
enhancements to the treatment of complex type restriction.  In  
general, in
Schema 1.1, a content model is a legal refinement of its base if every
sequence of elements accepted by the derived model is also valid per the
base (that's a bit of a simplification, but sufficient I think for
purposes of this note.)  A consequence of this is that restrictions of
<all> groups are now supported.  Indeed,  it's possible for <all> groups
to restrict other groups such as sequences and vice versa. (e.g. the
sequence {a,b} is a valid restriction of the all group all(a,b).

The workgroup leaves open the possibility that some of the functions  
that
you requested that are not supported in Schema 1.1 might be supported in
some future release.

We would be very grateful if you would send a note to the XML Schema
Comments mailing list (www-xml-schema-comments@w3.org) confirming that
these dispositions of your comments are acceptable to you, or if not,
explaining any remaining concerns.  Thank you very much.

Noah Mendelsohn
for the W3C XML Schema Workgroup

[1]
http://lists.w3.org/Archives/Public/www-xml-schema-comments/ 
2005JanMar/0038.html

[2]
http://lists.w3.org/Archives/Public/www-xml-schema-comments/ 
2005JanMar/0043.html

[3] http://www.w3.org/Bugs/Public/show_bug.cgi?id=2506

--------------------------------------
Noah Mendelsohn
IBM Corporation
One Rogers Street
Cambridge, MA 02142
1-617-693-4036
--------------------------------------










Unless stated otherwise above:
IBM United Kingdom Limited - Registered in England and Wales with  
number 741598.
Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire  
PO6 3AU

Received on Thursday, 22 March 2007 19:36:48 UTC