elements with descriptors

How would one go about creating schema for an element like the
following:

<me:mydata type="integer">123456</me:mydata>

where the value of the "type" attribute is a restriction?

I think it is as follows, but would like to confirm (or find out that I
am wrong!)

<xs:element name="mydata" type="mydataType" />
<xs:complexType name="mydataType" mixed="true">
	<xs:attribute name="type">
		<xs:simpleType>
			<xs:restriction base="xs:string">
				<xs:enumeration value="integer" />
				<xs:enumeration value="float" />
				<xs:enumeration value="other" />
			</xs:restriction>
		</xs:simpleType>
	</xs:attribute>
</xs:complexType>

would this do the trick?

thanks!
--saul
-- 
Syncline, Inc.
373 Washington St.
Boston, MA  02108

617-986-1000 (x248)

www.syncline.com -- Informing the Enterprise
www.mapciti.com -- It's Your Town on the Web

Received on Thursday, 6 December 2001 11:57:32 UTC