Skip to main content

BIN 882oo Documentation

  • Author:

  • Version: 18

  • Description: If A is true then also B must be present" with Constraints - XPath 1

  • Created: 2014-09-30

  • Modified: 2019-04-01

  • Source:

     Edit Bin W3C Schema Json-Schema Java Bean Code Default Value as XML

    Printers Embed Responsive

    <complexType name='ExampleIfAThenAlsoBOtherwiseNoB' description='If A is true then also B must be present" with Constraints - XPath 1'>
    	<field name='A' caption='A (if true input also B)' minOccurs='1' type='xs:boolean' node='attribute'/>
    	<field name='B' minOccurs='0' type='xs:string' node='attribute' extra:form.maybenull='true' extra:ctrl.emptyisnull='true'/>
    	<constraint name='If_A_ThenAlsoB_OtherwiseNoB' category='boolean' selector='.'>
    			<expression grammar='xpath'
    		             path='(A=&#39;true&#39; and B) or not(A=&#39;true&#39; or B)' />
    			
    	</constraint>	
    </complexType>