I am going to be getting XML data from an external source and am trying to create a schema for it. The XML will look something like this
<user>
<Questions1>
<field name="name1">value</field>
<field name="name2">value</field>
<field name="name3">value</field>
<field name="name4">value</field>
<field name="name5">value</field>
</Questions1>
<Questions2>
<field name="name6">value</field>
<field name="name7">value</field>
<field name="name8">value</field>
<field name="name9">value</field>
</Questions2>
</user>
What I would like to have be inforced is the name of the field has a fixed value and the possible values for the field tag limited to only what is possible for the fixed value in the name. So "name1" can only hold the values 1,2 and 3 and "name2" can only hold the values a,b and c.
If I need to redesign my xml, that's fine. I've gotten the schema so it will limit the values in "Name" and limit the "value" to a value any of the fields but when I try to limit it more, it says I can't have different types for the same field.
Thanks for any help you can give.