Using EasyCatalog to Create a Cross Table of XML Data

A common requirement is to construct a so-called Crosstab, in which multiple attributes are incorporated in a single table. For example, this data represents sets of trousers, with waist, length and price elements.

XML Data:

The target layout involves a table with the distinct lengths horizontally, distinct waist sizes vertically and prices in each cell.

This can be achieved with the following steps:

  • Create a data source with <record> as a record node, then defining a field to contain the entire XML tree of the <Merkmale> node. Marking it as an “XML fragment” will do this.
  • Set up a Formatting Rule, consisting of a standard InDesign table with table header row, one body row, a footer row and as many columns as needed, for example 20 columns.
  • Use table/cell/paragraph styles to define the appearance of the table. The Formatting Rule could look something like this:


  • Configure Table Options from the panel menu, choosing “Complex Table” and entering an  XSL transformation  which creates the cross table:
  • Placing the cursor into a text frame, choosing “Paginate” and … well, here’s what it looks like:

Data shown in this example can be downloaded from by clicking this link

Many thanks for the help of Rudi Warttmann at TopSet for his help with this example