new_tt = put_xml_see_also(txt,filen)
Add here a paragraph of the function description. Other paragraph can be added
Add here a paragraph of the function description
Add here scilab instructions and comments
//put_xml_see_also //Fonction qui insère un //dans un fichier xml contenant des délimiteurs //<SEE_ALSO> et </SEE_ALSO> //Entrée : txt : un vecteur de chaînes de caractères de taille n,1 // filen : nom du fichier xml (ex:filen=xml_path+'CAN_f.xml') function new_tt=put_xml_see_also(txt,filen) if fileinfo(filen)<>[] then if size(txt,2)==1 then del1='<SEE_ALSO>' del2='</SEE_ALSO>' tt_sav=mgetl(filen); a=0;b=0;new_tt=tt_sav; //trouve la position des délimiteurs for i=1:size(tt_sav,1) if strindex(tt_sav(i),del1)<>[] then a=i, end; if strindex(tt_sav(i),del2)<>[] then b=i, end; end if a<>0&b<>0 then tt_see_also=['<SEE_ALSO>'] for j=1:size(txt,1) tt_see_also=[tt_see_also; '<SEE_ALSO_ITEM> <LINK>'+txt(j,1)+'</LINK> </SEE_ALSO_ITEM>']; end tt_see_also=[tt_see_also;'</SEE_ALSO>'] //Ecrit la chaine de texte finale new_tt=[tt_sav(1:a-1);' '+tt_see_also;tt_sav(b+1:size(tt_sav,1))] end else printf("Incompatible rsh variable\n"); end else printf("File %s not found\n",filen); new_tt=[]; end endfunction