Saves an element/attribute structure to be used in the next publisher run. The contents must have a tree structure.

Child elements

Copy-of, Element, ForAll, Loop, Makeindex, SortSequence

Parent elements

AtPageCreation, AtPageShipout, Case, Contents, ForAll, Function, Loop, Otherwise, Record, SavePages, Until, While


attributes (XPath expression, optional)

The variable (as an XPath expression, e.g. $foo) which contains Attribute Elements. These attributes are added to the root element.

elementname (text)

Name of the root element that surrounds the elements given by the child elements.

name (text)

Name of the file. Example: toc

select (XPath expression, optional)

Alternative to giving the data structure in the child elements.


  <Record element="data">
    <SetVariable variable="attributesvar">
      <Attribute name="att1" select="'Hello'" />
      <Attribute name="att2" select="123" />

    <SaveDataset name="toc" elementname="root" attributes="$attributesvar">
      <Element name="child">
        <Attribute name="attchild" select="999"/>

This code saves an XML file to the disc which has this structure:

<root att1="Hello" att2="123">
 <child attchild="999"/>
<SaveDataset name="toc" elementname="Contents">
  <Copy-of select="$contents"/>

is equivalent to

<SaveDataset name="toc" elementname="Contents" select="$contents"/>

See also

Commands <Attribute>, <Element> and <LoadDataset> as well as the section Creation of XML structures.