Conditional Type Assignment
XSD 1.1 supports Conditional Type Assignment to allow the type of an element to depend on the value of one of its attributes. For example
the content model for <product action="create">
might be different from the content model for
<product action="delete">
.
The full syntax of XPath 2.0 can be used, but the expression is constrained to access the element node and its attributes: it has no access to the descendants, siblings, or ancestors of the element.