Vai al contenuto principale

BIN kmiD5 Documentation

  • Author:

  • Version: 7

  • Description: From http://html5doctor.com/demos/forms/forms-example.html

  • Created: 2015-12-27

  • Modified: 2015-12-27

  • Source:

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

    Printers Embed Responsive

    <?xml version='1.0'?>
    <osk xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:noNamespaceSchemaLocation='http://www.eleusoft.org/osk/osknons.xsd'  xmlns:extra='http://eleusoft.org/schema/extra'>
          <datatypeLibrary prefix='xs' uri='http://www.w3.org/2001/XMLSchema-datatypes' />
       
          <schema name='com.eleusoft.form2schema.output'>
                <complexType name='Form' description='From http://html5doctor.com/demos/forms/forms-example.html'>
                      <field name='given_name' caption='First Name' type='xs:string' minOccurs='1' extra:form.placeholder='First name only'>
                      </field>
                      <field name='family_name' caption='Last Name' type='xs:string' minOccurs='1' extra:form.placeholder='Last name only'>
                      </field>
                      <field name='dob' caption='Date of Birth' type='xs:date' minOccurs='1' extra:html5.type='date'>
                      </field>
                      <field name='email' caption='Email' type='xs:string' minOccurs='1' extra:form.placeholder='example@domain.com' extra:form.control='email'>
                      </field>
                      <field name='url' caption='URL' type='xs:string' minOccurs='0' extra:form.maybenull='true' extra:html5.type='url' extra:form.placeholder='http://mysite.com' extra:ctrl.emptyisnull='true'>
                      </field>
                      <field name='phone' caption='Telephone' type='xs:string' minOccurs='1' extra:form.placeholder='Eg. +447000 000000' extra:form.control='telephone'>
                      </field>
                      <field name='shoes' caption='Shoesize' type='xs:decimal' minOccurs='0' default='9' extra:form.maybenull='true' extra:html5.type='number' extra:ctrl.emptyisnull='true'>
                            <facet name='minInclusive' value='5'/>
                            <facet name='maxInclusive' value='18'/>
                      </field>
                      <field name='skill' caption='Flying Skill level (1 low - 100 high)' type='xs:int' minOccurs='0' default='0' extra:form.maybenull='true' extra:html5.type='range' extra:ctrl.emptyisnull='true'>
                            <facet name='minInclusive' value='1'/>
                            <facet name='maxInclusive' value='100'/>
                      </field>
                      <field name='address' caption='Address' type='xs:string' minOccurs='1' extra:form.control='textarea'>
                      </field>
                      <field name='postCode' caption='Post code' type='xs:string' minOccurs='1'>
                      </field>
                      <field name='country' caption='Country' type='xs:string' minOccurs='1'>
                      </field>
                      <field name='cardtype' caption='Card Type' type='xs:string' minOccurs='1' extra:ic.enumlabel.mastercard='Mastercard' extra:ic.enumlabel.amex='AMEX' extra:ic.enumlabel.visa='VISA' extra:form.control='options' extra:ic.enumlabels='true'>
                            <facet name='enumeration' value='visa'/>
                            <facet name='enumeration' value='mastercard'/>
                            <facet name='enumeration' value='amex'/>
                      </field>
                      <field name='cardName' caption='Name' type='xs:string' minOccurs='1' extra:form.placeholder='Name as it appears on your card'>
                      </field>
                      <field name='cardNo' caption='Card number' type='xs:decimal' minOccurs='1' extra:html5.type='number'>
                      </field>
                      <field name='security' caption='Security code' type='xs:decimal' minOccurs='1' extra:html5.type='number'>
                      </field>
    <!-- here could use extra:form.control='text' to use html5 'month' control -->
                      <field name='expiry' caption='Expiry Date' type='xs:gYearMonth'  minOccurs='0' extra:form.maybenull='true' extra:html5.type='month' extra:ctrl.emptyisnull='true'>
                      </field>
                </complexType>
          </schema>
    </osk>