Diffing Multiple Documents

This section describes how to use Stylus Studio to diff multiple XML documents.

Before continuing with this section, you should read Overview, which describes basic information about the Stylus Studio Diff tool, and The XML Diff Viewer, which describes features of the XML Diff Viewer and how to use them.

This section covers the following topics:

Document Focus

Diffing multiple XML documents is much the same as diffing a pair of documents - you specify the source documents (one at a time), a target document, and Stylus Studio calculates the diff.

When you diff multiple documents, however, only one source document can have focus at a time. Consider the following illustration, which shows three source documents (source1.xml, source2.xml, and source3.xml) and a target document (target.xml).

In this example, the source1.xml document currently has focus. You set the focus on a given source document by selecting that document from the drop-down list at the top of the source document window.

When a source document has focus:

Symbols Used in the Target Document Window

When diffing multiple documents, Stylus Studio uses an additional set of symbols in the target document window. These symbols, which are displayed in the side bar of the XML Diff Viewer window alongside the standard set of symbols described in Symbols and Background Colors, indicate the ways in which the change identified in the current source document differs from changes to the same node in other source documents.

As shown in Figure 137, symbols in the column closest to the document tree identify the changes relative to the currently selected source. Here, the edit symbol ( ) indicates that the value in the target document, White, differs from that in the currently selected source (which happens to be Black in this example).

The first column of symbols characterize changes in the currently selected source relative to other source documents. Here, for example, the red exclamation point ( ) indicates that there are conflicting modifications in other source documents - that is, other source documents contain a value other than Black. As shown in Figure 138, when you click on a symbol in the first column, Stylus Studio displays

Clicking on a document in this menu changes the current focus to that source document, allowing you to easily navigate to the same node in a different document.

The additional symbols used by Stylus Studio when diffing multiple documents are described in Table 17.

Consider the example in Figure 139, which illustrates diffing three documents. In this example, the node in question is circled in red.

Notice that:

Table 18 shows the symbols that might appear based on changing values to the node in question. The example illustrated in Figure 139 is shown in the first row. As values in the source documents change, Stylus Studio changes the diff symbol accordingly.

How to Diff Multiple Documents

To diff multiple documents:
1. Select Tools > Options > Show Differences > Files from the Stylus Studio menu.

Stylus Studio displays the XML Diff Viewer.

2. In the source document window, click the add button ( ) to add the first source document.

Stylus Studio displays the Open dialog box.

4. Click Open.
5. Repeat step 2 through step 4 for additional source documents.
6. Repeat step 2 through step 4 for the target document, using the set button for the target document window ( ).

By default, Stylus Studio runs the diff calculation automatically when you select the target document. If the default On changes setting has changed, you need to run the diff calculation manually by clicking the Calculate diff button ( ).

XML Schema Quality Checker

Use IBM's alphaWorks XML Schema Quality Checker to check the quality and style of your XML schema documents. Fully integrated with the Stylus Studio XML Schema Editor and XML validator.

Configuring an ODBC Data Source Using DataDirect SequeLink Server

How to create and configure an ODBC system data source for use with Stylus Studio using DataDirect Sequelink Server.

XML-to-HTML Mapper

Stylus Studio simplifies XML-to-HTML mapping through the industry's first and only XML to HTML mapping tool based on industry standard XSLT.

Apache AXIS

Develop and test Web service applications using Apache AXIS and Stylus Studio.

Stylus Most Wanted

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2007 All Rights Reserved.