User`s guide

9 Comparing XML Files
9-14
In this case, the user might expect to see the very first C element on the left marked as
deleted, with the second and third C elements matched to the corresponding C element
on the right. However, this might not happen, if the first C on the left is matched to the
second C on the right, even though these two C elements exist in very different parts of
the document hierarchy. This mismatch would result in the third C element on the left
being marked as deleted, which the user might find unexpected.
This case is likely to occur when there are several potential matching candidates for a
particular element. In other words, when elements of a particular label tend to be very
similar. Whether such a spurious cross-matching occurs or not depends on all of the
other C elements within the two documents. The LCS algorithm used for matching the
two sequences favors local matches over distant ones. In other words, sub-sequences
of elements that are close together in the first sequence tend to be matched to sub-
sequences of elements that are close together in the second sequence. However, this
locality is not always guaranteed, and the outcome depends on how other elements in the
sequence are matched.