W3C home > Mailing lists > Public > www-xml-schema-comments@w3.org > July to September 2000

Question about "Element Declarations Consistent" constraint

From: Jerome Simeon <simeon@research.bell-labs.com>
Date: Fri, 11 Aug 2000 11:44:04 -0400 (EDT)
Message-Id: <200008111544.LAA08680@starling.research.bell-labs.com>
To: www-xml-schema-comments@w3.org

Consider the following:

<<
Constraint on Schemas: Element Declarations Consistent 

  If the {particles} contains, either directly, indirectly (that is,
within the {particles} of a contained model group, recursively) or
implicitly two or more element declaration particles with the same
{name} and {target namespace}, all their {type definition}s must be
the same.
>>

What does the phrase "must be the same" mean?

Pretty clearly, the following should be ok.

       <sequence>
         <element name="a" type="x"/>
	 <element name="a" type="x"/>
       </sequence>

But is this ok, or not ok?

       <sequence>
         <element name="a">
	   <type>
	     <element name="b" type="x"/>
	   </type>	     
         </element>
         <element name="a">
	   <type>
	     <element name="b" type="x"/>
	   </type>	     
         </element>
       </sequence>

-- Jerome Simeon and Philip Wadler
Received on Friday, 11 August 2000 11:46:05 UTC

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