@ tefigel ### # Save metadata information from the XML model into Tefigel lists. # List "association" contains startClass-endClass pairs. # List "class" contains the class names. # One list "CUR_CLASS" for each class contains each class' properties, # recorded as name/type or name/method/method_type. # # Use regular expression comparison to test where we are in the # XML model tree. ### case TAG_PATH when ~Content/Class$ add_item(class,tp_name) globset CUR_CLASS=tp_name new_list(CUR_CLASS) for association_descr=~list_contents(association) ungroup(association_descr,-,assoc_from,assoc_to) if assoc_from=CUR_CLASS add_item(CUR_CLASS,assoc_to/class) endif endfor when ~Content/Class/Attribute add_item(CUR_CLASS,tp_name/tp_type) when ~Content/Class/Operation$ add_item(CUR_CLASS,tp_name/method/tp_returnType) globset CUR_METHOD=CUR_CLASS&tp_name new_list(CUR_METHOD) when ~Content/Class/Operation/Parameter add_item(CUR_METHOD,tp_type tp_name) when ~Association/Role if tp_type=start globset CUR_ASSOCIATION=tp_class else set CUR_ASSOCIATION=CUR_ASSOCIATION-tp_class add_item(association,CUR_ASSOCIATION) endif otherwise msg Unexpected tag path "TAG_PATH" endcase