Version 5.7.11

# `Record`

Contains the instructions when the publisher processes the element in the data file with the given name. The record matching the root element will be called by the software automatically, all further data handling must be done by the user. Either the attribute `element` or `match` must be given, but not both.

## Child elements

`AddSearchpath`, `AttachFile`, `Bookmark`, `ClearPage`, `Copy-of`, `DefineColor`, `DefineFontalias`, `DefineFontfamily`, `DefineMatter`, `DefineTextformat`, `ForAll`, `Group`, `Hyphenation`, `Include`, `InsertPages`, `Layout`, `LoadDataset`, `LoadFontfile`, `Loop`, `Message`, `NextFrame`, `NextRow`, `Options`, `Output`, `PDFOptions`, `Pageformat`, `Pagetype`, `PlaceObject`, `ProcessNode`, `SaveDataset`, `SavePages`, `Section`, `SetGrid`, `SetVariable`, `SortSequence`, `StructureElement`, `Switch`, `Until`, `Value`, `While`

## Parent elements

`Include`, `Layout`, `Section`

## Attributes

`element` (text, optional)
  The name of the element the record matches. Mutually exclusive with `match`.
`match` (text, optional, since version 5.5.8)
  An XPath-like pattern to match data elements. Supports simple element names (`foo`), wildcards (`*`), predicates (`item[@type='book']`), parent/child patterns (`catalog/product`), and ancestor patterns (`catalog//item`). A simple element name is equivalent to using `element`. When multiple patterns match, the most specific one wins. Mutually exclusive with `element`. Requires the lxpath XML parser.
`mode` (text, optional)
  Name of the mode that matches the mode in `ProcessNode`.

## Example

    <Record element="url" mode="output">
      <PlaceObject>
        <Textblock>
          <Paragraph>
            <A href="https://www.speedata.de"><Value>website of speedata</Value></A>
          </Paragraph>
        </Textblock>
      </PlaceObject>
    </Record>

    <!-- Pattern matching examples -->
    <Record match="item[@type='book']">
      ...
    </Record>

    <Record match="catalog/product">
      ...
    </Record>

    <Record match="*">
      <!-- Fallback for unmatched elements -->
      ...
    </Record>

#### On this page