if

Top  Previous  Next

- if <attribute name, attribute name...>

 

When used, it means that the attribute that it is applied to must be present if the "other" attributes(s) are also present.

 

For example:

 

<Order>
    <OrderID parent="Order" optional="true">1</OrderID>
    <OrderType parent="Order" if="OrderID" regex="Purchase|Return" optional="true">Purchase</OrderType>
</Order>