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 11230 - src-ta should have a similar wording as src-element.3
Summary: src-ta should have a similar wording as src-element.3
Status: RESOLVED FIXED
Alias: None
Product: XML Schema
Classification: Unclassified
Component: Structures: XSD Part 1 (show other bugs)
Version: 1.1 only
Hardware: All All
: P2 minor
Target Milestone: ---
Assignee: David Ezell
QA Contact: XML Schema comments list
URL:
Whiteboard:
Keywords: resolved
Depends on:
Blocks:
 
Reported: 2010-11-05 08:56 UTC by Andreas Meissl
Modified: 2010-11-26 18:19 UTC (History)
2 users (show)

See Also:


Attachments

Description Andreas Meissl 2010-11-05 08:56:33 UTC
Schema for schemas doesn't allow both a <simpleType> and a <complexType> as child for <alternative>, there only can be one of them at the same time. Therefore I suggest to change the wording of src-ta to something similar to src-element.3.

Instead of:

"every <alternative> element must have a type attribute, or a complexType child element, or a simpleType child element. Each <alternative> element must have one and only one of these."

I suggest to use something like:

"every <alternative> element must not have both a <simpleType> or <complexType> child and a type attribute."
Comment 1 David Ezell 2010-11-05 09:40:43 UTC
In Lyon:

The WG discussed this issue, and notes that the wording has led to confusion.

The proposed improved wording is:

"each <alternative> element must have one (and only one) of the following: a type attribute, or a complexType child element, or a simpleType child element."

Thank you for the comment.
Comment 2 Andreas Meissl 2010-11-05 11:05:45 UTC
I think my comment wasn't clear enough. The minor problem I see in the spec is the difference between src-element clause 3 and src-ta. Both are about the very same thing: 

An <element> / <alternative> must not have both a type attribute and a <complexType> or <simpleType> child. Schema for schemas only allows either a <complexType> or <simpleType> but not both. So the schema representation constraint only needs to forbid a type attribute in combination with a <complexType>/<simpleType> child. 

If the schema representation constraint is even more strict it's okay, but i think there should be no difference between how it is worded in src-element clause 3 and in src-ta, because both are about exactly the same problem.
Comment 3 Sandy Gao 2010-11-20 02:33:55 UTC
The difference between <element> and <alternative> is that <alternative> needs exactly one of the 3 things (type attribute, <simpleType> child, or <complexType> child), while <element> is allowed to have none (in which case it defaults to "anyType" or from its "substitution group affiliation").
Comment 4 Andreas Meissl 2010-11-25 12:15:48 UTC
Sorry, I didn't see this difference. Thank you for your explanation. The difference in the wording now makes sense to me.
Comment 5 C. M. Sperberg-McQueen 2010-11-26 18:19:54 UTC
The change described in comment 1 has now been made in the member-accessible status-quo versions of the document.   Accordingly I'm marking the issue resolved.

Judging by comment 4, I'm guessing that Andreas Meissl, as the originator of the issue, will have no objections to this resolution of the issue.  If that's so, please indicate as much by closing the issue.  If for some reason you're not happy with this resolution, please indicate by re-opening the issue and explaining what's wrong and what would be required to close the issue in your view.  If the WG doesn't hear from you in the next couple of weeks, we'll assume you're happy and close the issue on your behalf. 

Thank you in any case for your interest in the spec and for your review.