Vai al contenuto principale

BIN 1OG3l Documentation

  • Author:

  • Version: 9

  • Description: Test Enumeration in Union

  • Created: 2017-02-08

  • Modified: 2017-02-08

  • Source:

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

    Printers Embed Responsive

    <complexType name='Form' description='Test Enumeration in Union '>
        <field name='ChooseOrTypeOneColor' type='MyType' extra:form.control='options' extra:optionsctrl.freetext='true'
    extra:optionsctrl.ftxlabel='Type a color' extra:optionsctrl.options4row='4' ></field>
        <field name='ChooseOrTypeOneColorRestricted' type='MyTypeRestricted' extra:form.control='options' extra:optionsctrl.freetext='true'
    extra:optionsctrl.ftxlabel='Type a color' extra:optionsctrl.options4row='4' ></field>
        <field name='ChooseOrTypeOneColorRestrictedExpanded' type='MyTypeRestrictedExpanded' extra:form.control='options' extra:optionsctrl.freetext='true'
    extra:optionsctrl.ftxlabel='Type a color' extra:optionsctrl.options4row='4' ></field>
    </complexType>
    <simpleType name='MyType' type='MyUnion'/>
    <simpleType name='MyTypeRestricted' type='MyUnion' >
        <facet name='enumeration' value='Green' />
        <facet name='enumeration' value='Blue' />
    </simpleType>
    <!--  since is an open union, can add a new element that base type would validate as xs:string -->
    <simpleType name='MyTypeRestrictedExpanded' type='MyUnion' >
        <facet name='enumeration' value='Green' />
        <facet name='enumeration' value='Blue' />
        <facet name='enumeration' value='Bon' />
    </simpleType>
    <simpleType name='MyUnion' unionTypes='xs:string ColorEnum'/>
    <simpleType name='ColorEnum' type='xs:string'>
        <facet name='enumeration' value='Red'/>
        <facet name='enumeration' value='Green'/>
        <facet name='enumeration' value='Blue'/>
        <facet name='enumeration' value='Yellow'/>
        <facet name='enumeration' value='Brown'/>
        <facet name='enumeration' value='Aqua'/>
        <facet name='enumeration' value='Gold'/>
        <facet name='enumeration' value='Pink'/>
    </simpleType>