Function

Define a function

Child elements

ClearPage, Column, Columns, ForAll, LoadXML, Loop, Message, NextFrame, NextRow, Param, PlaceObject, ProcessNode, SaveXML, SetVariable, Slate, Switch, Value

Parent elements

Layout, Section

Attributes

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

Example

<Layout xmlns="urn:speedata.de/2021/xts/en"
    xmlns:sd="urn:speedata.de/2021/xtsfunctions/en"
    xmlns:fn="mynamespace"
    >

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

...

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

Print out the number 7.

See also