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

We've talked amongst ourselves and it seems your interpretation has some
merit. We don't apply the pointlessness rules to top level particles
because it means that one would not be able to differentiate between 

<xs:all>
 <element name="foo" type="xs:string" />
</xs:all>

and 

<xs:sequence>
 <element name="foo" type="xs:string" />
</xs:sequence>

for purposes of type derivation since the pointlessness rules would
reduce them both to 

  <xs:element name="foo" type="xs:string" />

Of course, in retrospect there probably isn't any reason to want to
preserve this distinction. I'll file a bug in our bug database but given
that we are late in the product cycle I can't promise that this will be
fixed in the next release. 

-- 
PITHY WORDS OF WISDOM 
To err is human, to forgive is against department policy.


This posting is provided "AS IS" with no warranties, and confers no
rights. 

 

> -----Original Message-----
> From: Henry S. Thompson [mailto:ht@cogsci.ed.ac.uk] 
> Sent: Friday, October 10, 2003 10:18 AM
> To: Dare Obasanjo
> Cc: Hugh Wallis; Priscilla Walmsley; xmlschema-dev@w3.org; Rob Blake
> Subject: Re: Problem with .NET - Invalid particle derivation 
> by restriction
> 
> 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 Wednesday, 29 October 2003 18:30:30 UTC