StoryTeller document
The actual output document is in the StoryTeller document.
The main document template design consists of two pages. The first page is required while the succeeding pages are optional. The header data for the document is designed by using various fragments. The part which can grow in size depending on input data is placed into a story. It is then put into a story frame and placed on the page layout.
Most of the components are designed with the help of tables, repeaters, and substitutions. Repeaters and substitutions are controlled by xpath which is used to control and adapt the layout based on the input data.
These examples are some useful xpath expressions:
/data/message/Invoice_No[. != ""])
This expression, if used in a repeater on a table row, does not display the row unless an invoice number is sent in the xml.
string(Line_Amount[. != 0])
This expression, if used in a substitution, does not display the field if the value is zero.
TextBlock[TextLine]
This expression, if used in a repeater on a table, does not create the textblock unless theTextBlock has a TextLine.