W3C home > Mailing lists > Public > xmlschema-dev@w3.org > June 2008

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

From: Michael Kay <mike@saxonica.com>
Date: Thu, 26 Jun 2008 15:18:34 +0100
To: "'Pete Cordell'" <petexmldev@codalogic.com>, <xmlschema-dev@w3.org>
Message-ID: <1022AC88F7CE4715A7FD7810FB6CDBDF@Sealion>

I think the rule was always there because schema was intended for more than
validation, e.g. for data binding applications, where assignment of types is
important.

Michael Kay
http://www.saxonica.com/ 

> -----Original Message-----
> From: xmlschema-dev-request@w3.org 
> [mailto:xmlschema-dev-request@w3.org] On Behalf Of Pete Cordell
> Sent: 26 June 2008 14:19
> To: xmlschema-dev@w3.org
> Subject: 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 14:19:11 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 23:15:47 UTC