I'm making a xml schema and I have to present database columns which have name, type and table they belong to. Like this:
<xs:complexType name="tMappingItem">
<xs:sequence>
<xs:element name="name" type="xs:string" />
<xs:element name="type" type="xs:string" />
<xs:element name="table" type="xs:string" />
</xs:sequence>
</xs:complexType>
Is there a more elegant way to do this? I can naturally do this:
<xs:element name="type" >
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="FLOAT" />
<xs:enumeration value="DOUBLE" />
<xs:enumeration value="INT" />
<xs:enumeration value="DATETIME" />
<xs:enumeration value="STRING" />
</xs:restriction>
</xs:simpleType>
</xs:element>
if there is no way to tell that "type" is of type type. ;)