Version 5.9.3

# `Function`

Define a function

## Child elements

`ClearPage`, `Column`, `Columns`, `Copy-of`, `ForAll`, `Group`, `LoadDataset`, `Loop`, `Message`, `NextFrame`, `NextRow`, `Output`, `Paragraph`, `Param`, `PlaceObject`, `ProcessNode`, `SaveDataset`, `SetVariable`, `Switch`, `Tablefoot`, `Tablehead`, `Tablerule`, `Td`, `Tr`, `Value`

## Parent elements

`Layout`, `Section`

## Attributes

`name` (text)
  The name of the function (with namespace prefix).

## Example

    <Layout xmlns="urn:speedata.de:2009/publisher/en"
            xmlns:sd="urn:speedata:2009/publisher/functions/en"
            xmlns:fn="mynamespace">

            <Record element="data">
                <PlaceObject>
                    <Textblock>
                        <Paragraph>
                            <Value select="fn:add(3,4)" />
                        </Paragraph>
                    </Textblock>
                </PlaceObject>
            </Record>

            <Function name="fn:add">
                <Param name="a" />
                <Param name="b" />
                <Value select="$a + $b" />
            </Function>
        </Layout>

Print out the number 7.

#### On this page