Is it possible to create an XML schema with the following behavior? I have an XML file that looks like this. I would like to either set or restrict the attributes of the object based on the value of Type. For example, if Type = "Bike", I may need to set attributes that apply only to Bike (for example, pedals, frame, etc.). If Type = "Car", I can highlight attributes that apply only to the car (i.e. Make, Model, Miles, etc.).
<Objects> <Object Type="Bike" Pedals="XXX" Frame="XXX" /> <Object Type="Car" Make="XXX" Model="XXX" Miles="XXX" /> </Objects>
Thanks in advance for any help. Let me know if you have any questions.
source share