F
foolproofplan
I am new to making schema for xml and am not exactly sure on a certain
restriction i need to make within an xsd. Take for example, a
complexType Car. I am trying to restrict certain elements from being
used when others are present. When I have an element leatherType
within Car, I do not want to allow the element fabricType to be used
in the same Car anymore.
If my explanation is a little confusion, here is the xml sructured I
want to restrict from happening:
<Car name=mine>
<leatherType>nice<leatherType/>
<fabricType>okay<fabricType/>
</Car>
(note: these are not the only two elements allowed for Car, many other
different elements may occur in there also but I only want to restrict
fabric because leather is there.)
Thanks for the help guys!
restriction i need to make within an xsd. Take for example, a
complexType Car. I am trying to restrict certain elements from being
used when others are present. When I have an element leatherType
within Car, I do not want to allow the element fabricType to be used
in the same Car anymore.
If my explanation is a little confusion, here is the xml sructured I
want to restrict from happening:
<Car name=mine>
<leatherType>nice<leatherType/>
<fabricType>okay<fabricType/>
</Car>
(note: these are not the only two elements allowed for Car, many other
different elements may occur in there also but I only want to restrict
fabric because leather is there.)
Thanks for the help guys!