Commit 07830930 authored by Jesse Mapel's avatar Jesse Mapel
Browse files

Fixed ProcessExportPds4 test failures caused by XML attribute ordering with QDomDocument

git-svn-id: http://subversion.wr.usgs.gov/repos/prog/isis3/trunk@8206 41f8697f-d340-4b68-9986-7bafba869bb8
parent 92fa6139
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
<?xml-model href="http://pds.nasa.gov/pds4/pds/v1/PDS4_PDS_1800.sch" schemetypens="http://purl.oclc.org/dsdl/schematron"?>
<Product_Observational xmlns="http://pds.nasa.gov/pds4/pds/v1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://pds.nasa.gov/pds4/pds/v1 http://pds.nasa.gov/pds4/pds/v1">
<Product_Observational >
 <File_Area_Observational>
  <Array_2D_Image>
   <Axis_Array>
@@ -23,7 +23,7 @@
unittest: Exporting
0% Processed
10% Processed
20% Processed
30% Processed
40% Processed
50% Processed
60% Processed
70% Processed
80% Processed
90% Processed
100% Processed
<?xml-model href="http://pds.nasa.gov/pds4/pds/v1/PDS4_PDS_1800.sch" schemetypens="http://purl.oclc.org/dsdl/schematron"?>
<Product_Observational xmlns="http://pds.nasa.gov/pds4/pds/v1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://pds.nasa.gov/pds4/pds/v1 http://pds.nasa.gov/pds4/pds/v1">
<Product_Observational >
 <File_Area_Observational>
  <Array_2D_Image>
   <Axis_Array>
+4 −2
Original line number Diff line number Diff line
@@ -26,14 +26,16 @@ void IsisMain() {
    
    p.SetInputCube(&cub);
    
    std::cout << p.StandardPds4Label().toString();
    // Remove the schema from the lable because we cannot ensure that
    // attributes come out in the same order every time
    std::cout << p.StandardPds4Label().toString().remove(QRegExp("xmlns.*\""));
             
    std::ofstream ofs;
    p.OutputLabel(ofs);

    p.StartProcess(ofs);

    std::cout << p.GetLabel().toString();
    std::cout << p.GetLabel().toString().remove(QRegExp("xmlns.*\""));

    p.WritePds4("temp.img");
    remove("temp.img");