Running the Diff Tool from the Command Line

In addition to using the Diff tool from the Stylus Studio user interface, Stylus Studio also provides a commandl line utility, StylusDiff.exe. This command line utility allows you to perform many of the same functions, and to use many of the same options, as the graphical Diff tool.

Restrictions

The following restrictions exist for using StylusDiff.exe:

Usage

The StylusDiff.exe utility has the following usage:

StylusDiff -source <sourceURI> -target <targetURI>
[-expandPrefixes/collapsePrefixes] [-expandERs/collapseERs]
[-comments/nocomments] [-attributes/noattributes] [-text/notext] [-pi/nopi]
[-er/noer] [-entities/noentities] [-formatting/noformatting] [-fold/nofold]
[-auto/best/fast]

Table 20 describes the usage for the StylusDiff command. For a complete description of these and other options that affect the XML Diff engine, see Engine Settings.

Parameter
Description
-source <sourceURI>
The path of the XML document you want to use as the source document in the diff. Required.
-target <targetURI>
The path of the XML document you want to use as the target document in the diff. Required.
-output <outputURI>
Saves the differences between the source and target files, if any, to the file you specify. Output files are saved with a .dff extension. Optional.
-expandPrefixes
-collapsePrefixes
Whether you want the XML Diff engine to use the URI
(-expandPrefixes) or ignore the URI (-collapsePrefixes) when comparing namespaces. The default is
-collapsePrefixes.
-expandERs
-collapseERs
Whether you want the XML Diff engine to compare entity references (-collapseERs) or values referenced by entity references (-expandERs). The default is -expandERs.
-comments
-noComments
Whether you want the XML Diff engine to compare comments (-commments) or to ignore comments (-noComments). The default is -comments.
-attributes
-noAttributes
Whether you want the XML Diff engine to compare attributes (-attributes) or to ignore attributes (-noAttributes). The default is -attributes.
-text
-noText
Whether you want the XML Diff engine to compare text
(-text) or to ignore text (-noText). The default is -text.
-pi
-noPI
Whether you want the XML Diff engine to compare processing instructions (-pi) or to ignore processing instructions (-noPI). The default is -pi.
-er
-noER
Whether you want the XML Diff engine to compare entity references (-er) or to ignore entity references (-noER). The default is -er.
-entities
-noEntities
Whether you want the XML Diff engine to compare entities
(-entities) or to ignore entities (-noEntities). The default is -entities.
-formatting
-noFormatting
Whether you want the XML Diff engine to compare formatting characters (-formatting) or to ignore formatting characters
(-noFormatting) when comparing text nodes. The default is
-formatting.
-fold
-noFold
Whether you want the XML Diff engine to fold similar blocks before diffing (-foldUnchangedBlocks) or to expand and diff nodes (-diffUnchangedBlocks). The default is
-foldUnchangedBlocks.
-auto
-best
-fast
Controls that let you choose between diffing algorithm tunings that have been optimized for time (-fast) and thoroughness (-best). A third choice, -auto, lets Stylus Studio determine which tuning to use. The default is -auto.
Table 20. StylusDiff Command Line Parameters

 
Free Stylus Studio XML Training: