Changeset 54 for trunk/src/editxml.m


Ignore:
Timestamp:
Mar 16, 2010, 7:41:52 AM (14 years ago)
Author:
sommeria
Message:

sub_background modified to accept various movie and image inputs
geometry_calib, editxml, civ modified to read a unique PARAM.xml parameter file (instead of PARAM_LINUX...)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/editxml.m

    r42 r54  
    332332    path_uvmat=which('editxml');% check the path detected for source file uvmat
    333333    path_UVMAT=fileparts(path_uvmat); %path to UVMAT
    334     if isunix
    335         xmlparam=fullfile(path_UVMAT,'PARAM_LINUX.xml')
    336         if exist(xmlparam,'file')
    337             tparam=xmltree(xmlparam);
    338             sparam=convert(tparam);
    339             if isfield(sparam,'SchemaPath')
    340                 schemapath=[fullfile(sparam.SchemaPath,head_name) '.xsd']
    341             end
    342         end     
     334%     if isunix
     335xmlparam=fullfile(path_UVMAT,'PARAM.xml');
     336if exist(xmlparam,'file')
     337    tparam=xmltree(xmlparam);
     338    sparam=convert(tparam);
     339    if isfield(sparam,'SchemaPath')
     340        schemapath=[fullfile(sparam.SchemaPath,head_name) '.xsd']
     341    end
     342    if exist(fullfile(path_UVMAT,schemapath)
     343        schemapath=fullfile(path_UVMAT,schemapath);%look for relative path definition
     344    end
     345    schemapath=fullfile(path_UVMAT,schemapath);
    343346%         schemapath=['/coriolis/papillon/data/civbin/XML_SCHEMAS/' head_name '.xsd']%current dir for schema
    344     else
    345         xmlparam=fullfile(path_UVMAT,'PARAM_WIN.xml')
    346         if exist(xmlparam,'file')
    347             tparam=xmltree(xmlparam);
    348             sparam=convert(tparam)
    349             if isfield(sparam,'SchemaPath')
    350                 schemapath=[fullfile(sparam.SchemaPath,head_name) '.xsd']
    351             end
    352         end
     347%     else
     348%         xmlparam=fullfile(path_UVMAT,'PARAM_WIN.xml')
     349%         if exist(xmlparam,'file')
     350%             tparam=xmltree(xmlparam);
     351%             sparam=convert(tparam)
     352%             if isfield(sparam,'SchemaPath')
     353%                 schemapath=[fullfile(sparam.SchemaPath,head_name) '.xsd']
     354%             end
     355%         end
    353356%         schemapath=['\\Papillon\data\civbin\XML_SCHEMAS\' head_name '.xsd']%current dir for schemas
    354     end
     357%     end
    355358    if exist(schemapath,'file')
    356359        xs=xmltree(schemapath);
    357360    else
    358         msgbox_uvmat('ERROR',['The xml schema for ' CurrentFile ' is unknown, check the schema path set in the xml file PARAM'])
     361        msgbox_uvmat('ERROR',['The xml schema for ' CurrentFile ' is unknown, check the schema path set in the file PARAM.xml'])
    359362        [FileName, PathName]=uigetfile( ...
    360363       {'*.xsd', '(*.xsd)';
Note: See TracChangeset for help on using the changeset viewer.