Diffing Folders

Stylus Studio allows you to diff two folders. As shown in Figure 144, the Diff Folders dialog box displays the contents of each folder; symbols and colors, described in Symbols and Background Colors, identify the types of changes in the respective folders.

Figure 144. The Diff Folders Dialog Box After a Diff

This section covers the following topics:

Features

The Diff Folders dialog box has several features that make it easy to diff folders and the XML documents they contain:

  • A splitter lets you change the width of the source and target folder windows. This can be especially useful if you are working with a folder that has nested directories.
  • A file type filter limits the display to files with a .xml extension; if you choose, you can display (and diff) all file types, as shown in Figure 144.
  • An Abort button, shown here, appears at the bottom of the Diff Folders dialog box if the operation you are performing (loading or diffing a directory with a large number of files, for example) is taking more time than usual. Clicking the Abort button cancels the operation.

    Figure 145. Abort Button Lets You Cancel Long Load Operations

Tip

 

This feature is also part of the XML Diff Viewer.

How to Diff Folders

To diff folders:
1. Select Tools > Show Differences In > Folders from the Stylus Studio menu.

The Diff Folders dialog box appears.

2. Click the Choose Source Folder button ( ).

The Select Source Folder dialog box appears.

3. Expand the Desktop tree and navigate to the folder you want to use as the source folder for the diff.
4. Click Open.

The folder is displayed in the Source folder window of the Diff Folders dialog box.

5. Repeat step 2 through step 4 for the target folder.

Stylus Studio performs the diff as soon as you select the target folder for comparison.

6. Optionally, use the Show files of type drop-down list to filter the display to show only those files of the type you specify. (By default, Stylus Studio shows XML files - files with a .xml extension.)

How to Diff Documents from the Diff Folders Dialog Box

You can diff XML documents in the source and target folders directly from the Diff Folders dialog box.

To diff two files from the Diff Folders dialog box:
1. Click the file you want to diff.

The document is shown as selected in both the Source folder and Target folder windows. In this illustration, the document authors_new.xml was selected.

Tip

 

Notice that, even though the file names are different, Stylus Studio is able to infer that authors_new.xml and authors_mods.xml are actually the same document.

If you select a document that cannot be diffed, you will not see the selection in the opposite window.

2. Click the Diff Files button.

Stylus Studio displays the XML Diff Viewer window.

For more information on diffing documents, see Diffing a Pair of XML Documents.

 
Free Stylus Studio XML Training:
W3C Member