HTML Compare Technical Specifications
DeltaNova’s HTML Compare compares two well-formed HTML files - identified as 'A' and 'B' - and generates a single HTML file describing the differences between them. The REST interface can be accessed from any programming language or system, including non-Java systems.
XML and HTML Processing
HTML Compare sends each document through an HTML parser followed by an XML parser prior to comparison. If the document starts with a DOCTYPE declaration or XML Schema reference, the parser processes the DTD or Schema and returns a SAX stream with all entities expanded and unspecified attributes set to their default values.
HTML Compare normalizes whitespace before performing the comparison.
Document Comparison Algorithm
DeltaNova HTML Compare compares the two HTML or XHTML files using their tree structure, identifying corresponding elements based on:
-
Same element local name and namespace.
-
Corresponding parent elements.
-
The root elements of both files must have the same local name and namespace.
HTML Compare determines the best fit at each level using a longest-common-subsequence algorithm. The best fit gives precedence to exactly equal elements over those with merely matching names and namespaces.
Element order: HTML Compare treats elements as ordered — a change in element order is identified as a change.
Attribute order: HTML Compare ignores attribute order. Attribute changes are represented using elements in the DeltaXML namespace.
Text Handling
PCDATA items are treated as atomic units by default and are not subdivided into words or characters.
XSLT filters modify the markup before comparison to provide word-by-word or character-by-character comparison. The XML parser interprets CDATA sections and expands entity references prior to comparison.
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 |
|
RAM |
8 GB minimum recommended |
Patents
Patents granted: 2001270901; EP1325432; 60134999.7; US 8,196,135 B2; CA 2416876; US 8,423,518 B2; EP2174238; 602008031420.0
Patents pending: 1315520.5; 14275178.3; 14/474,377