Reusing the XMLSchema simpleType element in an own schema

Hi,

I want to reuse the simpleType element definition we all use for defining our own schema's, in a schema.  In other words, I want to be able in the XML document, using my schema, to define simpleType elements as data.

Example:
<types xmlns:xsd="http://www.w3.org/2000/10/XMLSchema">
	<type name="myStringType" type="xsd:string"/>
	<type name="myEnumerationBasedOnStringType">
		<xsd:simpleType>
			<!-- If the following is impossible, it could restrict xsd:string too -->
			<xsd:restriction base="myStringType">
				<xsd:enumeration>Possible value</xsd:enumeration>
			</xsd:restriction>
		</xsd:simpleType>
	</type>
</types>

I tried to specify the type element like the following, but on validation I always get the same error stating that the type cannot be found, even when I import the schema:
<xsd:element name="type">
	<xsd:complexType>
		<xsd:sequence>
			<xsd:element name="simpleType" type="xsd:anySimpleType" minOccurs="0"/>
		</xsd:sequence>
		<xsd:attribute name="name" value="xsd:string"/>
		<xsd:attribute name="type" value="xsd:QName" use="optional"/>
	</xsd:complexType>
</xsd:element>

Can anybody help me with this problem, after looking for documentation for a long while, I am stuck, and I just cannot believe it is not possible.

Thanks in advance,
Gino Marckx.

**** DISCLAIMER **** 
"This e-mail and any attachments thereto may contain information 
which is confidential and/or protected by intellectual property 
rights and are intended for the sole use of the recipient(s) named above. 
Any use of the information contained herein (including, but not limited to, 
total or partial reproduction, communication or distribution in any form) 
by persons other than the designated recipient(s) is prohibited. 
If you have received this e-mail in error, please notify the sender either 
by telephone or by e-mail and delete the material from any computer. 
Thank you for your cooperation."

Received on Wednesday, 28 August 2002 06:22:49 UTC