Merge Technical Specification

Merge Technical Specifications

DeltaNova Merge can merge three or more well-formed XML 1.0 files and generate a single delta file representing the merged result and the relationships between the inputs. The file representing the differences is known as a delta file. We use the term 'file' in this specification but the XML inputs and outputs may use other datatype representations including strings, in-memory trees or event streams.

The software provides a procedural interface that can be embedded in other Java-based software. It also has a REST API which allows merge operations from a wide range of programming languages and systems. The REST service can be used to invoke concurrent merge, three-way concurrent merge and sequential merge either synchronously or asynchronously.

Delta Files

A delta output file has the same basic structure as the files that have been compared, with some additional attributes and elements. An XML namespace (the DeltaXML namespace) distinguishes these additional elements and attributes from those found in the input files. The delta file includes unchanged elements and attributes. The delta file provides a structured representation of the input files as a single file in which common data is shared.

XML Processing

The Merge functionality handles whitespace in the same way as Compare.

Comments and processing instructions can be preserved so that they appear in the delta file. Internal parsed general entities can be expanded or preserved. CDATA sections can be expanded or preserved.

The software handles namespaces and will detect elements in the same namespace even if the namespace prefix values are different. An element or attribute in a namespace may have a different namespace prefix in the delta file from that used in the input file.

Merge Process

DeltaNova Merge merges the XML files, taking account of the tree structure of the files and identifying corresponding elements in the files. Corresponding elements will have the same element local name and namespace and will have corresponding parent elements. The root elements of the files must have the same local name and namespace. The merge determines the alignment at each level in the tree structure between the files. The alignment algorithm determines the longest common subsequence of corresponding elements. The alignment algorithm gives precedence to elements that are exactly equal over those that have just the same element name and namespace.

The XML inputs are loaded into Merge in order. The order is recorded in an attribute on the root element of the merged delta file.

For a delta with type merge-concurrent, one input file is considered to be the common ancestor from which the other input files have been derived. As each successive file is loaded into the delta, the file is first aligned with the common ancestor and this alignment will take precedence over alignment between this file and other files previously loaded into the delta. 

For a delta with type merge-sequential, each input file is considered to be a derivative of the previous input file. As each successive file is loaded into the delta, the file is aligned with the previous file.

The Merge can use key values, specified by the user with an attribute in the DeltaNova namespace, to identify corresponding elements in the inputs. Alignment of elements with the same namespace, local name and key will take precedence in the alignment process over other alignment criteria. Elements with different keys in the files will not be considered to correspond.

The Merge treats elements as ordered, i.e., a change in order is identified as a change. Optionally any element can be identified to Merge as orderless, using an attribute in the DeltaNova namespace which must be present in all files. In this case the child elements may appear in any order in the files and Merge will match corresponding elements. Within an orderless element, a corresponding element is an element with the same name, namespace and key or an element that is exactly equal through its tree structure. Orderless elements must have element-only content.

Merge ignores the order of attributes. Changes to attributes are represented using elements in the DeltaNova namespace.

PCDATA items can be treated as a whole or subdivided into words.

System Requirements

Requirement

Details

Java

Java Standard Edition JRE version 17 or later

Platforms tested

Oracle Solaris 10 (Intel Xeon), macOS 10.6+, Windows Server 2008 R2, Windows 7

For support, any reported problem should be reproducible on at least one of these platforms.

Patents

Patents granted: 2001270901; EP1325432; 60134999.7; US8,196,135B2; CA 2416876; US 8,423,518 B2; EP2174238; 602008031420.0.

Patents pending: 1315520.5, 14275178.3, 14/474,377.