def build_schema(m, c_c):
schema = ET.Element('<STR_LIT>')<EOL>schema.set('<STR_LIT>', '<STR_LIT>')<EOL>global_filter = lambda selected: ooaofooa.is_global(selected)<EOL>for s_dt in m.select_many('<STR_LIT>', global_filter):<EOL><INDENT>datatype = build_type(s_dt)<EOL>if datatype is not None:<EOL><INDENT>schema.append(datatype)<EOL><DEDENT><DEDENT>scope_filter = lambda selected: ooaofooa.is_contained_in(selected, c_c)<EOL>for s_dt in m.select_many('<STR_LIT>', scope_filter):<EOL><INDENT>datatype = build_type(s_dt)<EOL>if datatype is not None:<EOL><INDENT>schema.append(datatype)<EOL><DEDENT><DEDENT>component = build_component(m, c_c)<EOL>schema.append(component)<EOL>return schema<EOL>
Build an xsd schema from a bridgepoint component.