Changeset 998 for trunk/src/editxml.m


Ignore:
Timestamp:
Feb 17, 2017, 12:09:25 PM (7 years ago)
Author:
g7moreau
Message:
  • Remove tab and space and end of line
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/editxml.m

    r977 r998  
    111111DataIn=get(heditxml,'UserData');
    112112if ~isempty(xs)
    113         xs_node=list.xs_uid(ind);%xs_node of the subelement #ind
    114         [nodeup,path,xs_element,xs_subelem]=scan_schema(xs,xs_node);
    115         [element,subelem]=get_xml(t,path,xs_element,NewRootUid,xs_subelem);
    116         update_list(handles,path,xs_element,element,NewRootUid,xs_subelem,subelem);
    117         if xs_element.subtest     
     113    xs_node=list.xs_uid(ind);%xs_node of the subelement #ind
     114    [nodeup,path,xs_element,xs_subelem]=scan_schema(xs,xs_node);
     115    [element,subelem]=get_xml(t,path,xs_element,NewRootUid,xs_subelem);
     116    update_list(handles,path,xs_element,element,NewRootUid,xs_subelem,subelem);
     117    if xs_element.subtest     
    118118        DataIn.CurrentUid=[DataIn.CurrentUid NewRootUid];%record new current uid
    119119        DataIn.xs_CurrentUid=[DataIn.xs_CurrentUid xs_node];%record the new curent schema uid
    120         end
     120    end
    121121   
    122122%     %update the import file display
     
    174174    else
    175175        [xs_nodeup,path,xs_element,xs_subelem]=scan_schema(xs,xs_nodeup);
    176                 [element,subelem]=get_xml(t,path,xs_element,nodeup,xs_subelem);
    177                 update_list(handles,path,xs_element,element,nodeup,xs_subelem,subelem);
     176        [element,subelem]=get_xml(t,path,xs_element,nodeup,xs_subelem);
     177        update_list(handles,path,xs_element,element,nodeup,xs_subelem,subelem);
    178178        %update the import file display
    179179        if isfield(DataIn,'h_ref')&ishandle(DataIn.h_ref)
     
    369369else
    370370    DataIn.xs_CurrentUid=find(xs,'/xs:schema/xs:element');%uid of the root element in the schema
    371         [nodeup,path,xs_element,xs_subelem]=scan_schema(xs,DataIn.xs_CurrentUid);%scan the schema at the root level
    372         [element,subelem]=get_xml(t,path,xs_element,1,xs_subelem);% read the corresponding xml data
    373         update_list(handles,path,xs_element,element,1,xs_subelem,subelem);%update the display of information on the interface
     371    [nodeup,path,xs_element,xs_subelem]=scan_schema(xs,DataIn.xs_CurrentUid);%scan the schema at the root level
     372    [element,subelem]=get_xml(t,path,xs_element,1,xs_subelem);% read the corresponding xml data
     373    update_list(handles,path,xs_element,element,1,xs_subelem,subelem);%update the display of information on the interface
    374374end
    375375set(heditxml,'UserData',DataIn);%store the new input xml file name
     
    655655up=1;
    656656if node>0
    657         nodeup=node;
    658         while up==1;
     657    nodeup=node;
     658    while up==1;
    659659        nodeup=get(t,nodeup,'parent');%move up to the parent in the tree
    660660        if isempty(nodeup)
     
    671671            end
    672672        end
    673         end
    674         element.attrup=attrup;
     673    end
     674    element.attrup=attrup;
    675675end
    676676%find the subelement properties in the xml file
     
    10431043    list_element=[];
    10441044%      Data.CurrentUid=[Data.CurrentUid root_uid]%record new current uid
    1045         for iline=1:length(list_uid)
     1045    for iline=1:length(list_uid)
    10461046        element=get(t,list_uid(iline));
    10471047        if isfield(element,'type')&isequal(element.type,'element')
     
    10711071            end
    10721072        end
    1073         end
     1073    end
    10741074    set(handles.list_element,'Value',1)%select the first line of list_element by default
    1075         set(handles.list_element,'String',cell2tab(list_element,' ') )
     1075    set(handles.list_element,'String',cell2tab(list_element,' ') )
    10761076    list.uid=list_uid;
    1077         set(handles.list_element,'UserData',list)
     1077    set(handles.list_element,'UserData',list)
    10781078end
    10791079%---------------------------------------------------------
     
    14151415% up=1
    14161416% if node>0
    1417 %       nodeup=node;
    1418 %       while up==1;
     1417%     nodeup=node;
     1418%     while up==1;
    14191419%         nodeup=get(t,nodeup,'parent');%move up to the parent in the tree
    14201420%         if isempty(nodeup)
     
    14311431%             end
    14321432%         end
    1433 %       end
    1434 %       element.attrup=attrup;
     1433%     end
     1434%     element.attrup=attrup;
    14351435% end
    14361436% %find the subelement properties in the xml file
Note: See TracChangeset for help on using the changeset viewer.