W3C home > Mailing lists > Public > xmlschema-dev@w3.org > March 2002

constraints on model group schema components: Unique Particle Att ribution

From: Kriegesmann, Peter <Peter.Kriegesmann@softwareag.com>
Date: Mon, 25 Mar 2002 16:49:26 +0100
Message-ID: <DFF2AC9E3583D511A21F0008C7E62106023722E5@daemsg02.software-ag.de>
To: xmlschema-dev@w3.org
Good afternoon ladies and gentlemen,

I have a question about constraints on model group schema components,
especially Unique Particle Attribution.

See http://www.w3.org/TR/xmlschema-1/#coss-modelGroup
Schema Component Constraint: Unique Particle Attribution 

My question:

Is the following schema below valid or is it a violation of the Unique
Particle Attribution ? What is your opinion ?

In my opinion the schema is correct, because within the sequence of the
content model of element "child" only element references are used.
So in fact there is no "ambiguity". This would be the case if there is
either a mix of an element reference and local element definition having the
same name attribute or if 2 local elements having the same name attribute
were defined.

<xs:schema xmlns:xs = "http://www.w3.org/2001/XMLSchema">
  <xs:element name = "root">
        <xs:element ref = "child"></xs:element>
  <xs:element name = "child">
        <xs:element ref = "x" minOccurs = "0"></xs:element>
        <xs:element ref = "x" minOccurs = "0"></xs:element>
  <xs:element name = "x" type = "xs:string"></xs:element>

Please do not make any schema optimization suggestions :-) 
Of course I know that this schema construct is not very useful and that I
could have used maxOccurs="2".

My question is more a general one.

Best regards,


Peter Kriegesmann
Phone	 06151-921484
Electronic Business Technologies (QE)				Fax
Software AG
Uhlandstrasse 12				
D-64297 Darmstadt
Received on Monday, 25 March 2002 10:49:30 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 14:55:55 UTC