Document Comparison Overview
You can compare the differences between any two documents using the Compare feature. If one of the documents is free-form XML, the other must be as well. You can compare an open document with any other open document, with a file on disk, or with the last saved version of the same document.
The document comparison menu options are available from the Tools menu when Full Menus is enabled. Choose > and then select from one of the three options: Last Saved, Window, or File.
You can also compare any two files on disk using the compare_files ACL function. The comparison output is saved to a third file that you name in an argument. If you want to determine whether a document was generated by the compare feature, you can use the doc_from_compare ACL function.
Document comparison is performed at the word level for content. In Compare, words are considered to be sequences of characters separated by whitespace. Whitespace is any tab, linefeed, vertical tab, formfeed, carriage return, or space character. However, when a whitespace character is significant, such as within as-is elements (where all characters are significant), it's included in the comparison.
Document comparison ignores processing instructions (PIs) for bookmarks and quickmarks, but it processes other PIs for content formatting (such as font, page break, or table cell shading). Generated text is ignored during comparisons. Changes to generated text are not considered valid comparisons (for example, consider the renumbering that would occur when items in a list are marked for deletion or addition but haven't yet been removed or added).
Graphic images and equations are not evaluated. However, if a graphic or equation is inserted or deleted, it will be marked in the comparison (but Tag Display must be set to Full or Partial to see the change).
You can save the Compare results document and preserve the differencing markers intact. The saved comparison document may not be contextually valid, but it can be reopened and saved again without losing the comparison markup. If Compare Entities was selected for comparison, then the Compare window saves the file with entities flattened as text; that is, the entity content is substituted for the entity reference when the document is saved.
You can also print comparison results documents. In Print Editor View, output includes the differencing markup such as wrappers and background color (or greyscale on non-color printers). In regular Print, attribute changes are not visible.
The
Compare tab in the
Preferences dialog box provides settings to customize the output of a comparison.
When the comparison executes, the output appears in a Compare window. (If you're using the ACL function compare_files to compare two files, the comparison output goes to a results file instead.) Compare tab provides a choice between either wrapper tags or PIs (processing instructions named Insert and Delete) to mark the differences in content as insertions and deletions. By default, PIs are used to mark insertions with underlines and deletions with strikethrough. Default background colors are also changed for the insertion and deletion selections. If content is simply moved, it's marked as a deletion in its original location and an insertion in its new location.
You can also choose to compare entities. Selecting Compare Entities expands file and text entities during the comparison and evaluates their content. When the results output is sent to the Compare window, the entities remain expanded. If Compare Entities is not selected, the comparison is performed strictly on entity references, and the entities are not expanded for evaluation.
If Show Attribute Changes is selected, then wrapper markers are applied to attribute changes.
Arbortext Editor uses a designated block of memory that's allocated to it during processing. The default memory allocation is 50 MB. You can use the ACL set diffmemory command to regulate how much memory is allocated during comparison processing. If this memory allocation is insufficient, you'll get an error message instructing you to set a larger allocation.
When you view the Compare results document, you can navigate the differences by using the Next Change and Previous Change items on the Find menu.
|
If you are viewing tables graphically in the results document, some table markup changes may not be apparent. To be certain you are viewing all your table tag attribute changes, you can use > > to see the table in markup view.
|
Related information