Modifying Default Diff Settings

Default settings for the behavior of the Diff engine and the appearance of diffed documents and folders are on the Engine and Presentation pages, respectively, of the Options dialog box. The Engine page, shown here, has settings that determine the conditions under which Stylus Studio runs the diff automatically, which items in a document (comments and text, for example) you want the diff engine to ignore, and settings that allow you to choose diffing algorithm tunings optimized for change description or time, for example.

Settings on the Engine page are reflected in the Diff editor tool bar, and in the XML Diff menu, shown here.

This section covers the following topics:

Opening the Options Dialog Box

To open the Options dialog box:
1. Click Tools > Options on the Stylus Studio menu.
The Options dialog box appears.
2. If necessary, expand the tree for Module Settings > XML Diff.
3. Click the page that contains the settings you want to modify.
4. To save a changed setting, click OK. Click Cancel to revert to close the dialog box and revert to the previous settings.

Engine Settings

This section describes the settings that affect the behavior and performance of the Diff engine.

General

The fields in the General group box affect the initial display of diffed documents and the conditions, if any, under which Stylus Studio runs the diff automatically.

l Automatically expand all diffs - By default, Stylus Studio collapses the display of the diffed documents. If you select this option, all nodes containing diffs are expanded when the diff is run.
l Collapse unchanged blocks - By default, Stylus Studio collapses any block that does not contain any changes to save space in the XML Diff Viewer window. These blocks are displayed as <unchanged> in the document tree. You might prefer to have the entire document structure visible, to provide context for changed nodes, for example.
Engine Options

The fields in the Engine Options group box affect how Stylus Studio diffs source and target documents.

l Use URI to compare namespaces - Controls whether or not URIs are used to compare namespaces in source and target documents.
l Expand entity references - Controls whether or not entity references, which in some cases can include files external to the source or target document, are expanded by the Stylus Studio diff engine for purposes of comparing one block with another.
l Ignore text formatting characters - Controls whether or not text formatting characters (new line, carriage return, and tab) are ignored when comparing source and target documents. This option is off by default.
l Show differences in - Provides granular control of what items in XML documents are diffed. There are separate settings for comments, text, entities, attributes, and processing instructions.
Performance

Diffing large, numerous, or complex documents can be time-consuming. Stylus Studio provides controls that let you choose algorithm tunings that have been optimized for change description or calculation time.

l Autodetect - Stylus Studio determines which algorithm tuning to use based on the number, content, complexity, and size of the source and target documents. Stylus Studio first tries to use the tuning that is optimized for change description; if it determines that processing resources are limited, it reverts to the algorithm tuning optimized for speed. This setting is on by default.
l Optimize change description - Provides the most economical set of changes possible. This calculation, though it yields the best results, can be costly in terms of time and processing resources.
l Optimize calculation time - Provides the set of changes in the shortest time possible.
l Optimize for large documents with few changes - Helps speed the diffing of large (greater than 1MB) documents by folding similar blocks before comparing nodes. This setting can be used in conjunction with any of the algorithm tuning settings and is on by default.
 
Free Stylus Studio XML Training: