W3C home > Mailing lists > Public > xmlschema-dev@w3.org > October 2003

Re: Problem with .NET - Invalid particle derivation by restriction

From: Henry S. Thompson <ht@cogsci.ed.ac.uk>
Date: Fri, 10 Oct 2003 18:18:18 +0100
To: "Dare Obasanjo" <dareo@microsoft.com>
Cc: "Hugh Wallis" <hugh_wallis@hyperion.com>, "Priscilla Walmsley" <priscilla@walmsley.com>, <xmlschema-dev@w3.org>, "Rob Blake" <robblake@microsoft.com>
Message-ID: <f5b4qyhau5h.fsf@erasmus.inf.ed.ac.uk>

The more I thought about this, the less I thought I was right to let
.NET off the hook on this one, even though it's a subject that's been
discussed in great detail.  Maybe it's just late on Friday and I'm not
too acute. . .

Anyway, here goes -- Dare, why doesn't the argument go like this:

Base particle (call it *B*, per Schema Component Constraint: Particle
Valid (Restriction) [1]):

Particle[
 min: 1
 max: 1
 term: Model Group[compositor: sequence
                   particles: < Particle[min: 0
                                         max: unbounded
                                         term: Wildcard[...] ] > ]

Restricting particle (call it *R*, ditto):

Particle[
 min: 1
 max: 1
 term: Model Group[compositor: sequence
                   particles: < Particle[min: 1
                                         max: 1
                                         term: ElementDecl[...] ],
                                Particle[min: 0
                                         max: 1
                                         term: ElementDecl[...] ] > ]


So lets work through Schema Component Constraint: Particle Valid
(Restriction) clause by clause:

1) They're not the same particle, so
2.1) No substitution groups involved;
2.2) Ignore pointless occurences
     Aha!  The top Particle of *B* is pointless:
       2.2.2.1 is True (its min and max are 1)
       2.2.2.2 is true, because 2.2.2.2.1 is true.

So now we proceed to the table, with the *B* which results from
ignoring the top Particle of the old *B*, i.e.

Particle[min: 0
         max: unbounded
         term: Wildcard[...] ]

So we take the box, which leads us to Schema Component Constraint:
Particle Derivation OK (All/Choice/Sequence:Any --
NSRecurseCheckCardinality) [2], which is clearly going to work.

So I claim you schema is actually OK, and .NET is wrong -- Dare?

ht

[1] http://www.w3.org/TR/xmlschema-1/#cos-particle-restrict
[2] http://www.w3.org/TR/xmlschema-1/#rcase-NSRecurseCheckCardinality
-- 
  Henry S. Thompson, HCRC Language Technology Group, University of Edinburgh
                      Half-time member of W3C Team
     2 Buccleuch Place, Edinburgh EH8 9LW, SCOTLAND -- (44) 131 650-4440
	    Fax: (44) 131 650-4587, e-mail: ht@cogsci.ed.ac.uk
		     URL: http://www.ltg.ed.ac.uk/~ht/
 [mail really from me _always_ has this .sig -- mail without it is forged spam]
Received on Friday, 10 October 2003 13:27:23 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 11 January 2011 00:14:40 GMT