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

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

From: Pete Cordell <petexmldev@codalogic.com>
Date: Thu, 26 Jun 2008 17:24:22 +0100
Message-ID: <000601c8d7a9$1a785e00$ea00a8c0@Codalogic>
To: "Michael Kay" <mike@saxonica.com>, <xmlschema-dev@w3.org>

Is this related to DB (e.g. SQL) data binding?  I'm not sure it has a big 
influence on OOP (JAVA/C++) data binding.

Pete Cordell
Codalogic
For XML C++ data binding visit http://www.codalogic.com/lmx/

----- Original Message ----- 
From: "Michael Kay"
To: "'Pete Cordell'"


> 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-----
>> 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 16:25:07 UTC

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