- From: Edwin Dankert <edankert@cladonia.com>
- Date: Tue, 6 Jan 2004 13:24:46 -0000
- To: xmlschema-dev@w3.org
Thanks, sorry forgot about that.
Having studied the problem in a bit more depth:
http://www.w3.org/TR/xmlschema-1/#rcase-MapAndSum
If I understand it correctly, you are trying to restrict your 'choice' with
a 'sequence' which is perfectly fine as long as:
1 "there is a complete order-preserving functional mapping from the
particles"
and
2 "The pair consisting of the product of the {min occurs} of R and the
length of its {particles} and unbounded if {max occurs} is unbounded
otherwise the product of the {max occurs} of R and the length of its
{particles} is a valid restriction of B's occurrence range"
1: I read this as (roughly translated):
Any result that is valid against the 'restricted sequence'
should also be valid when validated against the base.
The base is:
<xs:choice maxOccurs="unbounded" minOccurs="0">
<xs:element ref="a"/>
<xs:element ref="b"/>
<xs:element ref="c"/>
</xs:choice>
You are restricting this with:
<xs:sequence maxOccurs="1" minOccurs="1">
<xs:element ref="a"/>
<xs:element ref="b"/>
</xs:sequence>
The result would be something like this:
<root>
<a/>
<b/>
</root>
Which would be valid according to both the restriction and the base.
2: the calculated 'occurence range' (2,2) also seems to be a valid
restriction of the base.
I think that (to my surprise) Xerces might be wrong in this case?
Regards,
Edwin
Received on Tuesday, 6 January 2004 08:26:34 UTC