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 22294 - SchemaImport/emptyUnion11.xsd is not valid
Summary: SchemaImport/emptyUnion11.xsd is not valid
Status: RESOLVED FIXED
Alias: None
Product: XPath / XQuery / XSLT
Classification: Unclassified
Component: XQuery 3 & XPath 3 Test Suite (show other bugs)
Version: Working drafts
Hardware: PC Linux
: P2 normal
Target Milestone: ---
Assignee: Michael Kay
QA Contact: Mailing list for public feedback on specs from XSL and XML Query WGs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-06-06 08:43 UTC by Sorin Nasoi
Modified: 2013-06-07 17:31 UTC (History)
2 users (show)

See Also:


Attachments

Description Sorin Nasoi 2013-06-06 08:43:24 UTC
SchemaImport/emptyUnion11.xsd contains an empty union type that is not valid according to:

http://www.w3.org/TR/xmlschema11-2/#defn-rep-constr
"Either the memberTypes [attribute] of the <union> element must be non-empty or there must be at least one simpleType [child]."

Here is the error thrown by Xerces when validating the mentioned schema:
E [Xerces] src-union-memberTypes-or-simpleTypes: A <union> element must have either a non-empty memberTypes [attribute] or at least one <simpleType> element among its [children].
Comment 1 Michael Kay 2013-06-06 18:13:22 UTC
As I pointed out in message

https://lists.w3.org/Archives/Member/w3c-xsl-query/2013May/0042.html

the XSD 1.1 spec is a little unclear whether unions with no members are allowed.

However, the reference you provided seems to make it clear that even if they are allowed at the schema component level (which is necessary to support xs:empty) they are not allowed at the XML representation level, which makes them effectively untestable. So I think we will have to withdraw this collection of tests.
Comment 2 Sorin Nasoi 2013-06-06 18:17:46 UTC
(In reply to comment #1)
> As I pointed out in message
> 
> https://lists.w3.org/Archives/Member/w3c-xsl-query/2013May/0042.html
> 
> the XSD 1.1 spec is a little unclear whether unions with no members are
> allowed.
> 
> However, the reference you provided seems to make it clear that even if they
> are allowed at the schema component level (which is necessary to support
> xs:empty) they are not allowed at the XML representation level, which makes
> them effectively untestable. So I think we will have to withdraw this
> collection of tests.

Here is the list of test-cases from "prod-SchemaImport" that are using the SchemaImport/emptyUnion11.xsd:

prod-SchemaImport empty-union-001, prod-SchemaImport empty-union-005, prod-SchemaImport empty-union-006, prod-SchemaImport empty-union-007, prod-SchemaImport empty-union-015, prod-SchemaImport empty-union-016, prod-SchemaImport empty-union-020, prod-SchemaImport empty-union-028, prod-SchemaImport empty-union-034, prod-SchemaImport empty-union-035, prod-SchemaImport empty-union-037, prod-SchemaImport empty-union-041, prod-SchemaImport empty-union-042, prod-SchemaImport empty-union-049
Comment 3 O'Neil Delpratt 2013-06-07 16:40:36 UTC
Removed test cases specified in comment #2.
Comment 4 Michael Kay 2013-06-07 17:31:34 UTC
The list of tests in comment #2 was (very) incomplete. All the tests with names beginning "emptyUnion" have now been removed.