Options - Module Settings - XML Diff - Engine


XML Differencing is available only in Stylus Studio XML Enterprise Suite and Stylus Studio XML Professional Suite.

You use the Engine page of the Options dialog box to change default settings that affect how Stylus Studio diffs XML files.



The settings on this page do not affect how Stylus Studio diffs folders.



The fields in the General group box affect when the Stylus Studio diffing engine runs and basic document handling behavior.

  • 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 automatically when the diff is run.
  • 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. You might prefer to have the entire document structure visible, to provide context for changed nodes, for example.
  • Autorun diff - By default, Stylus Studio runs the diff operation if you make a change to one of the settings on the Engine page of the Options dialog box, or if you add a new source document or change the current target document. You can also specify that the diff should be calculated automatically whenever a source or target file changes - if you select If files modified, Stylus Studio runs the diff operation when it detects changes to a source or target document.

Engine Options

The fields in the Engine Options group box affect how Stylus Studio diffs files.

    • Use URI to compare namespaces - Controls whether or not URIs are used when comparing namespaces in source and target documents.
    • 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.
    • Ignore text formatting characters - Controls whether or not text formatting characters are used when comparing source and target documents. This option is off by default.
    • Show differences in - Provides granular control of what components of an XML document are diffed. There are separate controls for comments, text, entities, attributes, entity references, and processing instructions.


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

    • 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.
    • 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.
    • Optimize calculation time - Provides the set of changes in the shortest time possible.
    • 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.

How Options are Related to the Menu and the Tool Bar

Settings on the Engine Options page of the Options dialog box affect the default settings for both the XML Diff menu and tool bar in the XML Diff editor. You can override settings on the Engine Options page using the menu or the tool bar. To permanently change a setting, however, make the change on the Engine Options page.

For More Information

Specifying Stylus Studio Options

Diffing Folders and XML Documents

Free Stylus Studio XML Training:
W3C Member