Document Table Comparison Overview: CALS and HTML

Document Table Comparison Overview: CALS and HTML

DeltaNova includes specialised processing logic for two common XML table formats: CALS tables (as defined in the OASIS CALS Table Model, used in DocBook, DITA, and related schemas) and HTML tables (<table>, <tr>, <td> elements). When DeltaNova detects these structures in input XML, it applies format-aware comparison rather than generic element-by-element diffing.

Detecting Table Types

DeltaNova detects table types based on namespace URI and element name patterns:

Format

Detection Basis

CALS

<table> root with <tgroup>, <thead>, <tbody>, <row>, <entry> children

HTML

<table> with <tr>, <td>, <th> children (with or without HTML namespace)

Detection is automatic; no configuration is required to enable it.

Granularity of Comparison Results

DeltaNova selects one of three output granularities depending on the nature of the changes detected:

Granularity

Trigger

Description

Fine grain

Simple, representable changes

Word deleted, row added, column removed

Row-level

Spanning cells that would invalidate fine-grain output

Cell changed to span 2 rows; affected rows shown as A-only then B-only

Table-level

Structural conflicts impossible to represent validly

Column inserted overlapping an existing spanning cell

CALS vs HTML: Key Differences

Although HTML tables evolved from the CALS model, their XML syntax differs significantly — especially for spanning cells. Different processing logic therefore applies to each type.

For structural conflicts, CALS processing splits tables (showing the entire A table then the entire B table); HTML processing allows overlapping data, which may require careful interpretation.

Differences are especially pronounced for cells that use colspan or rowspan. In such cases, the CALS and HTML processors may produce different granularity results for the same structural change.

HTML table processing requires consistent use of optional elements across both inputs. If tbody is present in document A but absent from document B, tr elements in each document will not align correctly.

CALS Table Validation

All products performing CALS table processing validate input tables using the CALS Table Schematron (checking cell-structure integrity). A valid comparison result requires valid input. Validation failures can be configured to emit warnings or terminate the comparison as an error.

Supported Change Types

Change Type

CALS

HTML

Fine Grain

Table Split

Cell content change

Yes

Yes

Yes


Row addition / deletion

Yes

Yes

Yes


Column addition / deletion (no colname)

Yes

Yes

Yes


Column addition / deletion (colname)

Yes


Yes


Column span changes

Yes

Yes

Yes


Row span changes

Yes

Yes

Yes


3-way column/row span changes

Yes

Yes

Yes


2-dimensional span changes

Yes

Yes

Yes


Row group changes

Yes

Yes

Yes


Invalid tables

Yes



Yes

Configuring CALS Table Processing

Configuring HTML Table Processing