I want to declare the following thing in an XSD file:
Let's suppose we have a <field></field> item. This field can choose between three different types of attributes, but can just have one of them or none. I mean:
<field name_attribute="value">
<field name_attribute2="value">
<field name_attribute3="value">
<field>
Would be ok but:
<field name_attribute="value" name_attribute2="value">
or
<field name_attribute2="value" name_attribute3="value">
wouldn't be right.
I know that with xsd choice you can do that with elements, but I'm not sure if treating those attributes as elements could bring problems in the future as the application I'm doing is right now.
Is there any way to do what I'm telling or the only way is using xsd:choice for elements?
Let's suppose we have a <field></field> item. This field can choose between three different types of attributes, but can just have one of them or none. I mean:
<field name_attribute="value">
<field name_attribute2="value">
<field name_attribute3="value">
<field>
Would be ok but:
<field name_attribute="value" name_attribute2="value">
or
<field name_attribute2="value" name_attribute3="value">
wouldn't be right.
I know that with xsd choice you can do that with elements, but I'm not sure if treating those attributes as elements could bring problems in the future as the application I'm doing is right now.
Is there any way to do what I'm telling or the only way is using xsd:choice for elements?