Element with two attribute groups

I need to define the schema for validating the following xml document:

<something att1="1" att2="2">
	<brain>no<brain>
</something>

and also the element 'something' can be expresed as:

<something href="any uri" path="root/one/two"/>


I need subclass the element 'something' to be
	a Complextype which defines att1,att2 and brain items, say CT1
	and
	a complextype which defines href,path attributes, say CT2
but not both at the same time.

The parser can find 'something' one time as CT1 and other time as CT2

How can implement it on XML Schema?






<element name="something" type="?">
<complexType name="CT1">
	<all>
	<element name="brain"/>
	</all>
	<attribute name="att1" type="string">
	<attribute name="att2" type="string">
</complexType>
<complexType name="CT2">
	<attribute name="href" type="anyURI">
	<attribute name="path" type="string">
</complexType>

Received on Wednesday, 28 August 2002 11:25:42 UTC