HTML Compare Configuration File Schema Guide

HTML Compare Configuration File Schema Guide

This section documents every element in the XML schema for the HTML Compare REST configuration file. Use it alongside the Configuration Files topic.

Occurrence indicators: [*] = zero or more, [?] = zero or once, [+] = one or more.


Element: configuration (root)

The root element. Contains parameters.


Element: parameters

Contains all comparison parameter groups. Child elements:

Element

Description

comparisonType

Controls how text is compared.

formattingConfiguration

Controls inline structural change handling.

htmlConfiguration

HTML-specific output configuration.

mathmlConfiguration

MathML comparison settings.

svgConfiguration

SVG comparison and display settings.

tableConfiguration

HTML table comparison behaviour.


Element: comparisonType

Parent: parameters. Contains characterByCharacter.


Element: characterByCharacter

Parent: comparisonType. Type: xs:boolean.

When true, comparison operates at character level rather than word level.


Element: formattingConfiguration

Parent: parameters. Controls which HTML elements are marked as inline structural changes. Contains:

Element

Description

formattingElements

Comma/space-separated list of inline and block-level formatting elements.

ignoreFormattingElements

When true, formatting elements show no change (addition/deletion/modification).

retainComments

Whether changes in comments are processed.


Element: formattingElements

Type: xs:string. Default includes: b, i, u, em, strong, emphasis, dfn, code, sup, small, s, span, basefont, font, bdo, bdi, br, mark, ins, del, ruby, rt, rp, div.


Element: ignoreFormattingElements

Type: xs:boolean. When true, any element in formattingElements will not show additions,
deletions, or modifications.


Element: retainComments

Type: xs:boolean. Controls whether HTML comment changes are processed and shown in output.


Element: htmlConfiguration

Parent: parameters. Controls output styling. Contains:

Element

Description

inputAHighlightColour

Highlight colour for deleted (A) content.

inputAStyling

Styling for deleted (A) content.

inputBHighlightColour

Highlight colour for added (B) content.

inputBStyling

Styling for added (B) content.

All elements are xs:string. Default: A = red, B = green.


Element: mathmlConfiguration

Parent: parameters. Contains mathmlGranularity.


Element: mathmlGranularity

Attribute mode [enum]:

Value

Description

adjacent

Repeats A and B MathML inputs side by side.

detailed-adjacent

Repeats inputs side by side with individual changes highlighted.

inline

Reports differences within MathML without duplicating inputs.


Element: svgConfiguration

Parent: parameters. Contains:

Element

Type

Description

svgEnabled

xs:boolean

Enable SVG comparison.

svgGranularity

enum

How to display SVG changes (adjacent, detailed-adjacent).

svgZIndexEnabled

xs:boolean

Enable Z-index change representation.

zIndexMarkupStyle

xs:string

Markup colour for Z-index changes (default: purple).

svgFallbackEnabled

xs:boolean

Fall back to ADJACENT if alignment is below threshold.

svgFallbackChangedPercentage

xs:double

Fallback threshold percentage.

svgNumericToleranceEnabled

xs:boolean

Ignore changes smaller than tolerance value.

svgNumericToleranceValue

xs:string

Tolerance value (default 1%; also accepts pixel values).


Element: tableConfiguration

Parent: parameters. Contains:

Element

Type

Description

columnKeyingMode

enum

Column matching mode: auto or position.

ignoreColumnOrder

xs:boolean

Whether to ignore HTML table column order.

invalidTableBehaviour

enum

Processing for invalid tables: fail, propagateUp, compareAsXml.

normalizeTableColumns

xs:boolean

Whether to normalise HTML table column specification.

validationLevel

enum

Table validation strictness: relaxed or strict.

warningReportMode

enum

Warning reporting: pis, message, comments.


columnKeyingMode modes

Value

Description

auto

DocumentComparator manages keying automatically (also allows user-defined column keys).

position

Columns matched by position index (1-based, max defined by col attribute).

invalidTableBehaviour modes

Value

Description

fail

Throw an exception.

propagateUp

Propagate changes to the table level.

compareAsXml

Compare table content as well-formed XML.

validationLevel modes

Value

Description

relaxed

Known harmless invalidities do not bypass processing.

strict

All invalidities bypass the appropriate subsequent processing.

warningReportMode modes

Value

Description

pis

Report warnings using processing instructions (dxml_warn).

message

Report warnings using xsl:message (typically to stdout).

comments

Report warnings using XML comments.