Attribute

Create an attribute for the Element data structure that can be saved to the hard drive with SaveDataset.

Child elements

(none)

Parent elements

While

Attributes

name (text)

Name of the attribute that is created.

select (XPath expression)

The contents of the attribute

Example

<Element name="Entry">
  <Attribute name="chapter" select="@name"/>
  <Attribute name="page" select="sd:current-page()"/>
</Element>

creates the following structure:

<Entry chapter="(contents of @name)" page="(the current page number)" />

See also

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