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 2232 - R-240: Question re: Particle Derivation OK (All/Choice/Sequence:Any -- NSRecurseCheckCardinality)
Summary: R-240: Question re: Particle Derivation OK (All/Choice/Sequence:Any -- NSRecu...
Status: ASSIGNED
Alias: None
Product: XML Schema
Classification: Unclassified
Component: Structures: XSD Part 1 (show other bugs)
Version: 1.0 only
Hardware: All All
: P4 normal
Target Milestone: ---
Assignee: C. M. Sperberg-McQueen
QA Contact: XML Schema comments list
URL:
Whiteboard:
Keywords: unclassified
Depends on:
Blocks:
 
Reported: 2005-09-14 19:33 UTC by Sandy Gao
Modified: 2016-06-23 03:56 UTC (History)
1 user (show)

See Also:


Attachments

Description Sandy Gao 2005-09-14 19:33:39 UTC
I think the following passage in Part 1 is wrong: 

Schema Component Constraint: Particle Derivation OK (All/Choice/Sequence:Any -- 
NSRecurseCheckCardinality) 

For a group particle to be a valid restriction of a wildcard particle all of 
the following must be true: 

1 Every member of the {particles} of the group is a valid restriction of the 
wildcard as defined by Particle Valid (Restriction) (3.9.6). 

[...] 

If understood literally, this is saying that a particle of a model group can be 
a valid restriction of a wildcard. How can a particle be a valid restriction of 
a **wildcard** (as opposed to a **particle whose term is a wildcard**)? 

If, instead, I interpret it as: 

"1 Every member of the {particles} of the group is a valid restriction of the 
wildcard **particle** as defined by Particle Valid (Restriction) (3.9.6)." it 
becomes clearly wrong, given that the min occurs and max occurs of the "base" 
particle and the min occurs and max occurs of the "restricted" particle have a 
role in determining whether a "restricted" particle (say, an element 
declaration particle) is a valid restriction of a "base" particle (say, a 
wildcard particle). 

For example, suppose I want to restrict a wildcard particle (min occurs=4, max 
occurs=8) with a sequence particle whose term has three element declaration 
particles. The statement above would require that **each** of the element 
declaration particles was a valid restriction of the wildcard particle, which 
in turn implies that **each** of the element declaration particles had to have 
min occurs>=4, max occurs<=8 (see 3.9.6, Schema Component Constraint: Particle 
Derivation OK (Elt:Any -- NSCompat)). This makes no sense. 

A possible correction is rewording the sentence as follows: 

1 Every member of the {particles} of the group is a valid restriction of the 
wildcard particle as defined by Particle Valid (Restriction) (3.9.6), except 
that the min occurs of the wildcard particle must be replaced by 0 before 
applying Particle Valid (Restriction) (3.9.6). 

or perhaps as follows: 

1 Every member of the {particles} of the group is a valid restriction (as 
defined by Particle Valid (Restriction) (3.9.6)) of a particle constructed as 
follows: 
min occurs: 0 
max occurs: the same as the max occurs of the wildcard particle 
term: the wildcard 

See:
http://lists.w3.org/Archives/Public/www-xml-schema-comments/2003OctDec/0031.html
Comment 2 C. M. Sperberg-McQueen 2006-09-23 22:10:46 UTC
The schema component constraint in which this issue arises has been
deleted from 1.1 as part of the clarification of restriction.  So the
comment applies to 1.0 only, now, and I am changing the 'version'
value accordingly.