I have this in XML:
<Const Name="a" Value="1.0"/> <Const Name="b" Value="1"/> <Const Name="c" Value="A"/> <Const Name="d" Value="B"/>
Now only for Name = "b" Const , Value should be 1, 2, 3 or 4. No other values ββare allowed. Other Const may contain other values, as shown. How to express it in XSD?
So far I have this:
<xs:element name="Const"> <xs:complexType> <xs:attribute name="Value" type="xs:string" use="required"/> <xs:attribute name="Name" type="xs:string" use="required"/> </xs:complexType> </xs:element>
I am using XSD 1.0, it seems: VS2013 ... so the "Alternative" does not work for me ... unfortunately ...
source share