posted 21 years ago
No Kiran,
Its not possible to have the kind of arrangement that you've shown in your schema. First, you can't have an <element> directly under the <complexType> element. And you can have only one compositor (xsd:choice, xsd:sequence or xsd:all) directly under the <complexType> element. So, you'll have to put both the <element> tags in the <choice> tag, and that would be wrong since their names would clash and the validator would complain about 'redefinition'.
So, you can't have more than one declarations (of varying types) of elements in the same scope. If the types were the same, then it would've been okay.
BTW, this applies to attributes and types too.
Hope I've made some sense.
Dhananjay.