[XMLSCHEMA-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Why do we have 'Schema Component Constraint: Element Declarations Consistent'

From: Pete Cordell <petexmldev@codalogic.com>
Date: Thu, 26 Jun 2008 14:19:13 +0100
Message-ID: <002601c8d78f$3c2e94c0$ea00a8c0@Codalogic>
To: <xmlschema-dev@w3.org>
Why do we have 'Schema Component Constraint: Element Declarations Consistent'

I was just wondering why schema has the rules about "Schema Component 
Constraint: Element Declarations Consistent".  i.e. if two elements in the 
same complex type have the same name, then they have to have the same type. 
Surely if the association of element information items to particles is 
unambiguous and someone wants to declare:

<xs:sequence>
<xs:element name='a' type='xs:int'/>
<xs:element name='a' type='xs:string'/>
</xs:sequence>

then how does it break XML or schema to allow them to do it?  I can see that 
this might be a problem for XSLT processing, and as such such a schema 
design could be deemed practice, but is that schemas problem?

Thanks,

Pete Cordell
Codalogic
For XML C++ data binding visit http://www.codalogic.com/lmx/
Received on Thursday, 26 June 2008 13:20:03 GMT

Subscribe to the Stylus Scoop newsletter for helpful XML tips and tutorials.
Email
First Name
Last Name
Company

Download Stylus Studio 6 XML Enterprise Edition

Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2007 All Rights Reserved.