Dear all, I am facing an issue while validating using XSD1.1. I want to decide on the type of an element depending on one of its attribute value:
<xs:element name="myElement"> <xs:alternative test="@attribute = 'value1'" type="myElement.value1" /> <xs:alternative test="@attribute = 'value2'" type="myElement.value2" /> </xs:element> Now that works, both types "myElement.value1" and "myElement.value2" are complex types. However, I realized that if I have @attribute = 'value3', no errors are being thrown so I wanted to add a new alternative rule: <xs:alternative test="(@attribute ne 'value1') or (@attribute ne 'value2')" type="xs:error" /> But when that occurs, the validation error begin thrown are not what I am waiting for, it says that my attributes are not correct since the type of myElement is of simple type. So how could I throw an error saying that my @attribute is not of correct values? Thank you, Yoann --------------------------------------------------------------------- To unsubscribe, e-mail: j-users-unsubscr...@xerces.apache.org For additional commands, e-mail: j-users-h...@xerces.apache.org