Hi, I have xml:
<xml><fullname> <name attrib="true"/> <lastname1 attrib="false"/> <lastname2 attrib="false"/></fullname></xml>
I need to create a scheme to check it in such a way that it allows only 1 to be set to true (and the rest of them must be false [attribute attribute is defined as xs: boolean]), so I added a unique check in the element name as:
<xs:unique name="attribcheck"> <xs:selector xpath="name|lastname1|lastname2"/> <xs:field xpath="@attrib"/>
Of course, he will find that there is a duplicate "truth", but he will also find a duplicate "false". Does anyone know if there is a way to set a limit on which value to apply a unique restriction? that I can guarantee that only one of them is "true" at any given time
source share