Ok, so I have been tasked with writing an XSD from an XML document given to us by a vendor. This vendor does not have an XSD they can furnish, so I am reverse engineering one. Here is an example of the way this xml is formed:
<field name="id">1</field>
<field name="Sport">Football</field>
<field name="Position">Quarterback</field>
<field name="Touchdowns">7</field>
<field name="Interceptions">2</field>
<field name="Yardage">2000</field>
So, since all elements are named "field", I am having trouble creating the schema for this. This is what I have so far:
<xs:element name="field" type="xs:int">
<xs:simpletype>
<xs:attribute name="name" type="xs:string" default="id"/>
</xs:string>
</xs:element>
The problem I am running into is that all the elements will have the same name. The software I am using to write the xsd is having problems with that. Do I have the correct approach here?
Thanks for any help.