This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 16777 - Is the content model for override a sequence or a choice?
Summary: Is the content model for override a sequence or a choice?
Status: RESOLVED FIXED
Alias: None
Product: XML Schema
Classification: Unclassified
Component: Structures: XSD Part 1 (show other bugs)
Version: 1.1 only
Hardware: PC Windows NT
: P2 normal
Target Milestone: ---
Assignee: David Ezell
QA Contact: XML Schema comments list
URL:
Whiteboard:
Keywords: resolved
Depends on:
Blocks:
 
Reported: 2012-04-18 14:48 UTC by Priscilla Walmsley
Modified: 2012-11-23 17:11 UTC (History)
1 user (show)

See Also:


Attachments

Description Priscilla Walmsley 2012-04-18 14:48:30 UTC
The XML Representation Summary in section 4.2.5 shows the content of the override element as if its content model is a choice among all the elements (including annotation).  

However, the Schema for Schemas (and the DTD for schemas) defines the outer group as a sequence (i.e. one annotation, following by a choice group of all the other elements).  

It seems like the outer group should be a choice, to allow annotations to repeat and appear anywhere, like they can in redefines.
Comment 1 David Ezell 2012-04-20 15:51:34 UTC
ACTION: SG to investigate bug 16777 and come back (hopefully) with a reason why we did what we did.
Comment 2 David Ezell 2012-05-18 16:33:25 UTC
RESOLVED:  The WG believes that override should really not depart from redefine in this regard, and even though the WG may have had some reason originally, the parallelism with redefine is more valuable.  The WG therefore agrees to make required changes to the S4S.
Comment 3 C. M. Sperberg-McQueen 2012-05-18 19:38:21 UTC
For the record:  

- An early version of the override proposal, at 

  https://www.w3.org/XML/Group/2004/06/xmlschema-1/structures.b4767.200707.html

has a sequence both in the schema for schema documents and in the syntax display (in section 4.2.3 of the proposal, now 4.2.5).  The description of that proposal says that in the design illustrated by the wording proposal, override resemble redefine, with some exceptions, one of which is:

    Only allow one <annotation> element as the first child. I believe this is a 
    better design; but we may want to change it to match the design for <redefine>.

There is no trace in bug 4767 or in the IG archives of July and August 2007 that the editors ever actually sent this proposal to the WG.  Bug 4767 says that on 3 August 2007 the WG assigned a disposition of LATER to that bug.

- The WG reopened bug 4767 in April 2008; proposal at 

  https://www.w3.org/XML/Group/2004/06/xmlschema-1/structures.b4767.html

exhibits the contradiction between the syntax display in section 4 and the schema for schema documents which is identified in the bug description (comment 0) of this bug.  The CVS logs do not show any changes in this area:  when the proposal was dusted off, the content model was changed in the syntax display, and neither the change history nor the editors' private email show any discussion of the change.

The IG discussion of this revived proposal is in a thread beginning at
 
    https://lists.w3.org/Archives/Member/w3c-xml-schema-ig/2008May/0044.html

There is no explicit discussion of the change.  

- In the revised proposal, the mention of a difference in content model between override and redefine has been dropped from the status section.  That, together with the fact that a manual change was made to the schema dump file from which the syntax displays are generated, suggests that the intent was to change the syntax to agree with that of redefine, but that owing to an editorial slip the syntax change was made only in part.

In sum, I think this is just an unfortunate consequence of the fact that we have never been able to re-create the automatic generation of the syntax displays from the schema for schema documents, owing to shortcomings in the editorial production system and lack of resources for fixing those shortcomings.

This examination of the history of the changes has persuaded me that the WG's decision on this morning's call is correct, and that the schema for schema documents should be changed, rather than the syntax display.
Comment 4 C. M. Sperberg-McQueen 2012-10-20 20:52:22 UTC
A diffed version of the spec showing a draft erratum for this issue is now on the server at

  https://www.w3.org/XML/Group/2004/06/xmlschema-1/structures.errata-2012.html
  (member-accessible link)

The WG needs to review this text, so I'm marking this bug as 'needs review'.

Priscilla, if you could, please review the resolution of the issue and let us know whether you have any objections to it.  If we don't hear from you in the next two weeks or so, we'll assume you are happy with the changes.  (If you don't currently have member access, let us know so I can send you a copy of the diffed spec.)
Comment 5 Priscilla Walmsley 2012-10-21 14:47:41 UTC
The change looks correct to me.  

To nitpick, the way the DTD for Schemas was edited there are two sets of unnecessary parentheses.  The edited version looks like this:

(
                      ((%annotation; | %simpleType; | %complexType; 
                      | %group; | %attributeGroup;) |
                       %element; | %attribute; | %notation;)*)>
                       
when it could just be:

                      (%annotation; | %simpleType; | %complexType; 
                      | %group; | %attributeGroup; |
                       %element; | %attribute; | %notation;)*>
                       
Minor detail, though.
Comment 6 David Ezell 2012-11-23 17:04:49 UTC
Agreed to make the change for comment 5.
Approved the fix.

See section G.3 item 5.
Comment 7 David Ezell 2012-11-23 17:06:02 UTC
Agreed to make the change for comment 5.
Approved the fix.

See section G.3 item 5.
Comment 8 David Ezell 2012-11-23 17:11:30 UTC
Dear Pricilla:
As the originator of the bug, if you agree with the resolution please close the bug, and otherwise let us know your thoughts.  If we don't hear from you in 2 weeks we'll assume you're happy.

Best regards,
David Ezell