bridgepoint/gen_xsd_schema.py
def build_enum_type(s_edt):
    '''
    Build an xsd simpleType out of a S_EDT.
    '''
    s_dt = nav_one(s_edt).S_DT[17]()
    enum = ET.Element('xs:simpleType', name=s_dt.name)
    enum_list = ET.SubElement(enum, 'xs:restriction', base='xs:string')
    
    first_filter = lambda selected: not nav_one(selected).S_ENUM[56, 'succeeds']()
    
    s_enum = nav_any(s_edt).S_ENUM[27](first_filter)
    while s_enum:
        ET.SubElement(enum_list, 'xs:enumeration', value=s_enum.name)
        s_enum = nav_one(s_enum).S_ENUM[56, 'precedes']()
    
    return enum
def build_enum_type(s_edt):
    '''
    Build an xsd simpleType out of a S_EDT.
    '''
    s_dt = nav_one(s_edt).S_DT[17]()
    enum = ET.Element('xs:simpleType', name=s_dt.name)
    enum_list = ET.SubElement(enum, 'xs:restriction', base='xs:string')
    
    first_filter = lambda selected: not nav_one(selected).S_ENUM[56, 'succeeds']()
    
    s_enum = nav_any(s_edt).S_ENUM[27](first_filter)
    while s_enum:
        ET.SubElement(enum_list, 'xs:enumeration', value=s_enum.name)
        s_enum = nav_one(s_enum).S_ENUM[56, 'precedes']()
    
    return enum
def build_enum_type ( s_edt ) : s_dt = nav_one ( s_edt ) . S_DT [ 17 ] ( ) enum = ET . Element ( 'xs:simpleType' , name = s_dt . name ) enum_list = ET . SubElement ( enum , 'xs:restriction' , base = 'xs:string' ) first_filter = lambda selected : not nav_one ( selected ) . S_ENUM [ 56 , 'succeeds' ] ( ) s_enum = nav_any ( s_edt ) . S_ENUM [ 27 ] ( first_filter ) while s_enum : ET . SubElement ( enum_list , 'xs:enumeration' , value = s_enum . name ) s_enum = nav_one ( s_enum ) . S_ENUM [ 56 , 'precedes' ] ( ) return enum
Build an xsd simpleType out of a S_EDT.
Build an xsd simpleType out of a S_EDT .