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 4147 - MS Particles tests: particlesV020
Summary: MS Particles tests: particlesV020
Status: NEW
Alias: None
Product: XML Schema Test Suite
Classification: Unclassified
Component: Microsoft tests (show other bugs)
Version: 2006-11-06
Hardware: PC Windows 3.1
: P2 normal
Target Milestone: ---
Assignee: C. M. Sperberg-McQueen
QA Contact: XML Schema Test Suite mailing list
URL:
Whiteboard: MSM to fork a duplicate test for 1.1 ...
Keywords: disputedTest
Depends on:
Blocks:
 
Reported: 2007-01-03 17:20 UTC by Michael Kay
Modified: 2012-12-04 00:52 UTC (History)
1 user (show)

See Also:


Attachments

Description Michael Kay 2007-01-03 17:20:07 UTC
In the Microsoft Particles test set, test 

   <test group="particlesV020" name="particlesV020"/>

the schema is described as invalid. XSV also reports it invalid, but I am not convinced this is supported by a reading of the spec.

In private correspondence, Henry Thompson suggested that R is not validly derived from B, because the type of bar is derived from the type of SUB by extension, not by restriction. However, the rule:

2.1 Any top-level element declaration particle (in R or B) which is the {substitution group affiliation} of one or more other element declarations and whose ·substitution group· contains at least one element declaration other than itself is treated as if it were a choice group whose {min occurs} and {max occurs} are those of the particle, and whose {particles} consists of one particle with {min occurs} and {max occurs} of 1 for each of the declarations in its ·substitution group·.

suggests that it boils down to a question of whether 

<element name="bar" type="x:c2"/>

is validly derived from 

<choice>
  <element name="SUB" type="x:c1"/>
  <element name="bar" type="x:c2"/>
</choice>

and it would seem that it is, regardless of the relationship of x:c1 to x:c2.
Comment 1 Zafar Abbas 2007-01-24 18:31:58 UTC
Actually you have to wrap the derived element particle in a <choice> group itself to check a valid restriction as per Elt:All/Choice/Sequence -- RecurseAsIfGroup. So it comes down the question if 

<choice>
<element name="bar" type="x:c2" maxOccurs="2"/>
</choice>

is a valid restriction of:

<choice maxOccurs="3">
  <element name="SUB" type="x:c1"/>
  <element name="bar" type="x:c2"/>
</choice>

which is clearly is not as the bar in the derived type is not a valid restriction of the one in the base type as it fails occurence range check.


Comment 2 Henry S. Thompson 2010-01-31 13:20:43 UTC
tending towards disputedTest. . .