Diff
This tag is used for calculating the differences between two or more files. The tag will throw events of the type diffs.xxx that will contain the various differences between the files and will throw one final diff.xxx event that contains the summarized information for all of the differences between those files. See the Event information below for more detalis.
Children Tags
(input){0,*}
Events
diff Event
uri[0-totalfiles].path
The full path for each of of the files that were compared during the diff calculation.
difflines
The total number of lines that are different between the files being diffed.
totallines
The total number of lines in that were compared during the diff calculation.
totalfiles
The total number of files that were compared during the diff calculation.
diffs Event
linenumber
The line number of where the two files identified by the uris attribute differ.
uris
the ids of the URI's that differed (0-totafiles).
line[0-totalfiles]
There will exist two of these per diffs event that is thrown and they will be numbered based on the uris attribute so that you can easily identify which file contained which line.
Usage Examples
Example #1
<diff>
   
<input uri="storage://OUTPUT/file1" />
   
<input uri="storage://OUTPUT/file2" />
   
<input uri="storage://OUTPUT/file3" />
</diff>
Example #2
<diff>
   
<input uri="storage://OUTPUT/basedata" />
   
<input uri="storage://OUTPUT/currentdata" />
</diff>
Example #3
<sequence>
   
<record uri="storage://OUTPUT/diffs">
      
<diff>
         
<input uri="storage://OUTPUT/file1" />
         
<input uri="storage://OUTPUT/file2" />
         
<input uri="storage://OUTPUT/file3" />
      
</diff>
   
</record>
   
<log>number of lines that differ: ${diff.difflines}</log>
   
<query cursor="differences" event="diffs" uri="storage://OUTPUT/diffs" />
   
<iterate cursor="differences">
      
<log>files differ at line: ${differences.linenumber}</log>
      
<for property="id" range="${differences.uris}">
         
<log>file ${diff.uri${id}.path} has ${differences.line${id}}</log>
      
</for>
   
</iterate>
</sequence>