Trying to define multi-level enumeration restrictions
Posted: Tue Nov 01, 2005 12:57 am
Hi all,
I have XML as follows:
<FieldConfig Group="MAIN" FieldName="OrderNumber"/>
<FieldConfig Group="MAIN" FieldName="Customer"/>
<FieldConfig Group="MAIN" FieldName="Address"/>
<FieldConfig Group="DETAIL" FieldName="Customer"/>
<FieldConfig Group="DETAIL" FieldName="JobDesc"/>
etc.
What I want to do is restrict the FieldName attribute to a different set of values for each possible Group value.
For example, valid Group values are: MAIN, DETAIL, PAYMENT.
In Group MAIN, valid FieldName values are OrderNumber, Customer, Address, Phone.
In Group DETAIL, valid FieldName values are Customer, StartDate, JobDesc.
What is the best way to set up the restrictions in the XSD? Thanks in advance,
Vernon
I have XML as follows:
<FieldConfig Group="MAIN" FieldName="OrderNumber"/>
<FieldConfig Group="MAIN" FieldName="Customer"/>
<FieldConfig Group="MAIN" FieldName="Address"/>
<FieldConfig Group="DETAIL" FieldName="Customer"/>
<FieldConfig Group="DETAIL" FieldName="JobDesc"/>
etc.
What I want to do is restrict the FieldName attribute to a different set of values for each possible Group value.
For example, valid Group values are: MAIN, DETAIL, PAYMENT.
In Group MAIN, valid FieldName values are OrderNumber, Customer, Address, Phone.
In Group DETAIL, valid FieldName values are Customer, StartDate, JobDesc.
What is the best way to set up the restrictions in the XSD? Thanks in advance,
Vernon