Template lines

Template lines describe what to display for a notice, and how to structure the information displayed. Each template line declares a context, and the content to display for each occurrence that the context matches in the notice. With indentation, you nest template lines under other template lines. A template line together with the template lines nested under it forms a template block.

This page describes a template line and its parts: indentation, outline marker, context declaration, and the three ways to give its content (DISPLAY, conditional display and INVOKE). For the content itself, see Template content.

Template line

A template line displays content once for each occurrence that its context matches in the notice.

Syntax
WITH <context-declaration> DISPLAY <template>;
WITH <context-declaration> <conditional-display>;
DISPLAY <template>;
<conditional-display>;
WITH <context-declaration> <template-invocation>;
<template-invocation>;

A template line that displays content (the first four forms) can start with an indentation, and with an outline marker or a bullet. A template line that invokes a callable template (the last two forms) can start with an indentation only:

<indentation><outline-marker> WITH <context-declaration> DISPLAY <template>;
<indentation>* WITH <context-declaration> DISPLAY <template>;
<indentation>WITH <context-declaration> <template-invocation>;
<indentation>

optional: tabs or spaces that nest the template line under the nearest line above it with less indentation (see Indentation).

<outline-marker>

optional: a number, ?, # or # followed by a tag, which makes the line a heading (see Heading).

*

optional: a bullet, which makes the line a bulleted line (see Bulleted line).

<context-declaration>

the occurrences for which EFX displays the template line, and optional variables (see Context declaration).

<template>

the content to display (see DISPLAY).

<conditional-display>

WHEN clauses and an optional OTHERWISE clause (see Conditional display).

<template-invocation>

INVOKE and the name of a callable template with its arguments, or WHEN clauses that each invoke a callable template (see Template invocation).

The context declaration after WITH selects occurrences in the notice, and EFX displays the template line once for each of them. It evaluates the expressions of the template line with that occurrence as their context (see Evaluation context). When the context matches nothing, EFX displays nothing for the template line, and nothing for the template lines nested under it.

A template line without WITH has the root node of the notice as its context. At the top level, EFX displays it once. Nested under another template line, it is displayed once each time that template line is displayed.

A template line ends with a semicolon. It can take several lines of the file (see Line terminator and line joining).

You write the keywords WITH, DISPLAY, WHEN, OTHERWISE and INVOKE in upper case.

EFX displays a template line nested under another template line after it, for each occurrence of the context of the parent template line. It reads the context of the nested line from the context of the parent template line (see Context changes).

Restrictions

  • The content of a template line cannot be empty.

Examples

WITH BT-00-Text DISPLAY #{name}: $value;

Displays the name of the field and its value, once for each BT-00-Text in the notice.

DISPLAY #{auxiliary|text|notice-information};

A template line without context, displayed once.

WITH ND-SubNode DISPLAY #{name};
	WITH BT-01-SubNode-Text DISPLAY #{name}: $value;
	DISPLAY ${count(BT-00-Repeatable-Text)} texts in the notice;

A template block: a template line with two nested template lines. The last one has no context of its own, so EFX displays it once for each ND-SubNode.

EFX-1 template lines had the form {<context>} <template>, without semicolon. In EFX-2, you write WITH <context> DISPLAY <template>; instead, and EFX-2 does not accept the EFX-1 form. Template lines without context, conditional display and INVOKE are new in EFX-2.

See also: Template file

Indentation

Indentation nests template lines under other template lines. A template line and the template lines nested under it form a template block, so the template lines form a hierarchy.

Syntax
<template-line>
<indent><template-line>
<indent><indent><template-line>
<indent>

one level of indentation: one tab, or the number of spaces chosen for the file.

A template line indented one level deeper than the template line before it is nested under that template line. The template lines that follow with the same indentation are nested under the same template line. A template line with less indentation closes the template blocks that are deeper than it.

Each template file uses either tabs or spaces for indentation. With tabs, each tab is one level. With spaces, the first indented template line of the file sets the number of spaces of one level. Every indentation must then be a multiple of that number.

If a template line takes several lines of the file, only the indentation of its first line counts. When a template line continues on other lines, the indentation of those lines does not matter. Blank lines and comment lines do not count either.

You indent the template lines of every section in the same way, and the first template line of each section is at the top level (see Sections).

Restrictions

  • A mix of tabs and spaces is an error, in one line or between lines.

  • With spaces, an indentation that is not a multiple of the number of spaces of one level is an error.

  • A template line can be indented by at most one level more than the template line before it.

  • The first template line of each section cannot be indented.

Examples

WITH ND-Root DISPLAY Root;
	WITH ND-SubNode DISPLAY Sub-node;
		WITH BT-01-SubNode-Text DISPLAY $value;
	WITH BT-00-Text DISPLAY $value;
WITH ND-RepeatableNode DISPLAY Repeatable node;

Indentation with tabs. The line Sub-node and the line with BT-00-Text are nested under Root. The last template line is at the top level again.

WITH ND-Root DISPLAY Root;
  WITH ND-SubNode DISPLAY Sub-node;
    WITH BT-01-SubNode-Text DISPLAY $value;
  WITH BT-00-Text DISPLAY $value;

Indentation with two spaces for each level.

WITH ND-Root DISPLAY Root;
	WITH ND-SubNode,
	     text:$sub-text = BT-01-SubNode-Text
	DISPLAY ${$sub-text};

A nested template line on three lines of the file. Only the indentation of the first one counts.

Heading

A heading is a template line that starts a part of the displayed notice, such as "2 Buyer" or "2.1 Contracting authority". A template line is a heading when it starts with an outline marker: a number, ?, #, or # followed by a tag. A template line that displays content without a marker is a normal line, or a bulleted line when it starts with a bullet (see Bulleted line).

Syntax
<indentation><number> <rest-of-template-line>
<indentation>? <rest-of-template-line>
<indentation># <rest-of-template-line>
<indentation>#<tag> <rest-of-template-line>
<number>

a whole number written with digits, starting with a digit from 1 to 9, such as 1 or 12. The heading receives this outline number.

?

the heading receives the next outline number among the numbered headings at its level. This is the highest number of the headings before it in the same block, plus one, or 1 when there is none.

#

the heading receives no outline number.

<tag>

a name for a heading without outline number, written directly after the #, such as #notice-info. It contains lower-case letters, digits and hyphens, and starts with a letter.

The marker comes after the indentation and before the rest of the template line. EFX ignores the spaces after it.

Outline numbers. The application that displays the notice uses the outline numbers to number its parts. The number displayed for a heading is made of the number displayed for the line that it is nested in, a full stop and its own number, for example 4.2. When that line has no number, only the heading’s own number is displayed. This is the case for a normal line, and for a heading marked with # or with a tag. The same applies at the top of a callable template: its headings display their own numbers, not the number of the heading above the line that invokes the template.

A normal line has no number, and does not count for the numbering of the headings that follow it. The numbering starts again in each section. Only a heading that has nested template lines displays its number.

Heading level. The level of a heading is the number of headings that it is nested in, plus one. So a heading that is not nested in another heading is at level 1. Normal lines do not count. The template translator gives each heading its level, so that the application that displays the notice can show the heading in the right way.

Navigation address. Each heading has a navigation address. It is made of the outline numbers and tags of the headings that the heading is nested in, the outermost first, then its own, joined by underscores, such as 5_1_10 or 1_notice-info. A heading marked with # adds nothing to the address. A heading of the navigation section links to the heading of the main section that has the same address (see Navigation section). The address of a heading in a template section starts with the address of the nearest heading above the line that invokes the template (see Template invocation).

Restrictions

  • An outline number contains digits only. A number such as 1.2 is an error, because the hierarchy of the template lines gives the first part of the number.

  • 0, and a number that starts with a zero such as 01, are errors. To give a heading no number, mark it with #.

  • A tag starts with a lower-case letter: #Info and #1-info are errors. include cannot be a tag, because #include starts an include directive.

  • Two headings of the main section that are displayed for the same occurrence cannot have the same navigation address. Give them different numbers or tags, or put them under different headings. The template translator reports a navigation address used twice when it reaches both headings through the same contexts.

  • A line that invokes a callable template cannot be a heading (see Template invocation).

Examples

1 WITH ND-Root DISPLAY Root;
	? WITH ND-SubNode DISPLAY Sub-node;
		WITH BT-01-SubNode-Text DISPLAY $value;

The first template line is a heading with the number 1, and the second one a heading with the number 1.1. The last template line has no marker, so it is a normal line.

? WITH ND-Root DISPLAY First;
	WITH BT-00-Text DISPLAY $value;
5 WITH ND-SubNode DISPLAY Second;
	WITH BT-01-SubNode-Text DISPLAY $value;
? WITH ND-RepeatableNode DISPLAY Third;
	WITH BT-00-Text-In-Repeatable-Node DISPLAY $value;

The three headings receive the numbers 1, 5 and 6.

# WITH ND-Root DISPLAY Not numbered;
	? WITH ND-SubNode DISPLAY Numbered 1;
		WITH BT-01-SubNode-Text DISPLAY $value;

The first heading has no number. The second one receives the number 1.

#notice-info DISPLAY #{auxiliary|text|notice-information};
	1 WITH ND-SubNode DISPLAY Sub-node;
		WITH BT-01-SubNode-Text DISPLAY $value;

A heading with the tag notice-info, at level 1, and a heading at level 2 with the navigation address notice-info_1.

1 DISPLAY A;
	#a DISPLAY x;
2 DISPLAY B;
	#a DISPLAY y;

Two headings with the same tag, under different headings. Their addresses, 1_a and 2_a, are different.

From the SDK (view-templates/16.efx)
1 WITH OPT-300-Procedure-Buyer DISPLAY #{auxiliary|text|buyer}; // 1 Buyer
	1 WITH ND-ContractingParty DISPLAY #{auxiliary|text|buyer}; // 1.1 Buyer

The comments show the numbers that result. The example leaves out the template lines nested under these two lines.

In EFX-1, a template line without a number received one automatically, and 0 removed the number. In EFX-2, you ask for the automatic number with ?, and a line without a marker, or marked with #, has no number. Tags, heading levels and navigation addresses are new in EFX-2.

Bulleted line

A bulleted line is a template line that the application displays with a bullet in front of it. A template line is a bulleted line when it starts with a bullet: *.

Syntax
<indentation>* <rest-of-template-line>
<indentation>

optional: tabs or spaces that nest the line under another line (see Indentation).

*

the bullet. White space separates it from the rest of the line.

<rest-of-template-line>

a template line that displays content: an optional WITH and a context declaration, then DISPLAY and a template, or a conditional display.

Apart from its bullet, a bulleted line is like a normal line. Its template can have a caption (see Caption). EFX displays it once for each occurrence that its context matches, and you can nest other lines under it, including other bulleted lines. It has no outline number, and it does not count for the numbering of the headings.

You can write a bulleted line wherever you can write a normal line: at the top level or nested under another line, in the main, summary and navigation sections, and in template sections. The header section is the exception: it contains normal lines only.

EFX does not group bulleted lines into lists. Which bulleted lines are displayed next to each other depends on the notice: a line with WITH is displayed once for each occurrence, and a line can display nothing. The application that displays the notice decides how to show the bullets, and whether to group neighbouring bulleted lines.

Restrictions

  • A bulleted line displays content. It cannot invoke a callable template. To display the lines of a callable template with bullets, write the bullets on the lines of the template.

  • A line has a bullet or an outline marker, not both.

  • A bulleted line cannot be written in the header section.

Examples

WITH ND-Root DISPLAY Texts:;
	* WITH BT-00-Text DISPLAY #{name}: $value;
	* DISPLAY a: b;

A normal line with two bulleted lines nested under it. Both bulleted lines have a caption.

1 DISPLAY Heading;
	* WHEN BT-00-Number > 1 DISPLAY big OTHERWISE DISPLAY small;

A bulleted line with a conditional display, under a heading.

* WITH BT-00-Text DISPLAY $value;
	* DISPLAY nested;
		DISPLAY deeper;

A bulleted line at the top level, with a bulleted line nested under it, and a normal line under that one.

--- TEMPLATE item ---
* DISPLAY x;
--- MAIN ---
WITH ND-Root INVOKE item();

The bullet is written on the line of the callable template. The invoking line displays that bulleted line.

Bulleted lines are new in EFX-2.

See also: Heading, Caption

Context declaration

The context declaration, after WITH, gives the occurrences in the notice for which EFX displays a template line. It can also declare variables for the template line and the template lines nested under it.

Syntax
WITH <context>
WITH <context>, <variable-initialiser>, <variable-initialiser>, …
WITH <variable-initialiser>, <variable-initialiser>, …, <context>
WITH <variable-initialiser>, …, <context>, <variable-initialiser>, …
<context>

one of:

<variable-initialiser>

optional, any number: <type>:$<variable-name> = <expression> (see Variable declaration).

EFX displays the template line once for each occurrence that the context matches. In a nested template line, EFX reads the context from the context of the parent template line. An index then counts the occurrences within the current occurrence of the parent template line.

EFX evaluates the variables declared before the context with the root node of the notice as context, also in a nested template line. It evaluates the variables declared after the context with the new context, once for each occurrence matched. A variable can use the variables declared before it in the same context declaration.

You can use the variables of a template line in that template line and in all the template lines nested under it, but not in the other template lines (see Scope of variables).

A context variable declares the context and gives it a name at the same time. You can then use the name with a context override in nested template lines.

To give a template line the root of the notice as its context, write ND-Root, or leave out the context declaration (see Template line).

Restrictions

  • WITH must be followed by a context. A context declaration with variables only is an error.

  • A context declaration contains one context. A context variable cannot appear among the other variables.

  • A variable cannot have the name of a global variable, or the name of a variable of a parent template line.

  • You cannot use dynamic variables (dynamic:) in a template file.

  • The context is a field or a node. A slash alone is not a context: WITH / DISPLAY … is an error. For the root of the notice, write ND-Root.

Examples

WITH BT-00-Text DISPLAY $value;
WITH BT-00-Repeatable-Text[at 1] DISPLAY $value;
WITH BT-00-Number[BT-00-Number > 0] DISPLAY $value;
WITH /BT-00-Text DISPLAY $value;

A field, the first occurrence of a field, a field with a predicate, and an absolute field reference as context.

WITH ND-SubNode, text:$sub-text = BT-01-SubNode-Text DISPLAY ${$sub-text};
WITH text:$root-text = BT-00-Text, ND-SubNode DISPLAY ${$root-text};
WITH text:$prefix = 'Sub: ', ND-SubNode, text:$label = concat($prefix, BT-01-SubNode-Text) DISPLAY ${$label};

A variable after the context, evaluated for each ND-SubNode. A variable before the context, evaluated from the root of the notice. Variables on both sides.

WITH context:$sub = ND-SubNode DISPLAY #{name};
	WITH BT-00-Text DISPLAY ${$sub::BT-01-SubNode-Text};

A context variable used in a nested template line.

WITH ND-SubNode DISPLAY #{name};
	WITH ND-Root DISPLAY ${BT-00-Text};

A nested template line whose context is the root of the notice.

In EFX-1, you wrote the context declaration between braces, and it contained only a field or a node reference. Variables and context variables are new in EFX-2.

DISPLAY

DISPLAY introduces the content that a template line displays.

Syntax
DISPLAY <template>
<template>

one or more fragments: text, label blocks, expression blocks, hyperlinks and line breaks (see Template content).

EFX displays the fragments of the template one after the other, in the order in which you write them. In a template line that is not a heading, a colon separates a caption from the content (see Caption). White space between and inside the fragments stays. EFX ignores white space at the start of the template, after DISPLAY, line breaks included. It also ignores white space at the end, before the semicolon or before a WHEN or OTHERWISE that follows.

You also use DISPLAY in the clauses of a conditional display.

Restrictions

  • The template cannot be empty. To display nothing in some cases, use a conditional display without OTHERWISE.

Examples

WITH BT-00-Number DISPLAY #{name}: ${BT-00-Number};

A label, a text and an expression block.

WITH BT-00-Text DISPLAY   The text   ${BT-00-Text}   ;

EFX ignores the spaces after DISPLAY and before the semicolon. It displays the three spaces after The text.

In EFX-1, the template followed the context declaration directly, without a keyword.

See also: Template line

Caption

A caption is the part of a template that names what the rest of the template displays, such as the name of a field before its value. You write it before a colon: in #{name}: $value, the caption is #{name}, and the content is $value.

Syntax
DISPLAY <caption>: <content>
<caption>

one or more fragments: text, label blocks, expression blocks and line breaks (see Template content).

<content>

one or more fragments, which the caption names.

Why captions exist. Without a caption, a template such as #{name}: $value is one piece of text, and the application that displays the notice can only show it as written. With a caption, the application receives the two parts separately, and can choose their layout: the caption above the content, in front of it, or in a cell of its own, as in a table. It can also choose the separator between them, which can depend on the language of the display. In this way, each application can adapt the presentation of the notice to its own visual style.

In a template line that is not a heading, the first colon of the template separates the caption from the content. EFX does not display the colon, or the spaces and tabs around it. The template translator passes the caption and the content separately to the application that displays the notice, which decides how to present them. The language does not set a presentation.

A template has no caption in the following cases:

  • it contains no colon: all of it is content;

  • nothing follows its only colon, as in Total:: the template, colon included, is content;

  • the template line is a heading (see Heading): the colons of a heading are displayed as written.

For a colon that is part of the text, such as the colon in a time or in a web address, write \:, as in 10\:30 or https\://example.com. EFX displays it as a colon, and it does not start a caption.

A colon without a backslash also ends the text before it, in a heading as well. So, in a heading, Read:more@{'…'} links only more, while Read\:more@{'…'} links the whole text (see Hyperlink).

In a conditional display, each clause has its own caption and content (see Conditional display).

Restrictions

  • A template that is not a heading has at most one colon without a backslash: a: b: c is an error.

  • A template cannot start with a colon, in a heading as well: DISPLAY : x is an error.

  • A hyperlink block cannot follow a colon directly: Read:@{'…'} is an error. Write Read\:@{'…'}.

Examples

WITH BT-00-Number DISPLAY #{name}: ${BT-00-Number};

The caption is the name of the field, and the content its value.

WITH BT-00-Text DISPLAY ${BT-00-Code}: $value;

An expression block as caption.

WITH BT-00-Number WHEN BT-00-Number > 0 DISPLAY #{name}: positive OTHERWISE DISPLAY #{name}: other;

Each clause has a caption and a content.

WITH BT-00-Text DISPLAY Time\: 10\:30;

No caption: both colons are text. The template displays Time: 10:30.

1 WITH ND-Root DISPLAY Part: one: two;
	WITH BT-00-Text DISPLAY x;

A heading has no caption: it displays Part: one: two.

In EFX-1, a colon in a template was ordinary text, and EFX-1 displayed the whole template as written. Captions are new in EFX-2. To use an EFX-1 template line in EFX-2, check each colon. Write \: for a colon that EFX must display, and keep only one colon without a backslash, which then separates the caption from the content.

See also: DISPLAY, Text

Conditional display

A conditional display chooses the content of a template line according to conditions, which EFX evaluates for each occurrence of the context.

Syntax
WHEN <condition> DISPLAY <template> … OTHERWISE DISPLAY <template>
WHEN <condition> DISPLAY <template> … OTHERWISE <template>
WHEN <condition> INVOKE <template-name>(<argument>, …) … OTHERWISE INVOKE <template-name>(<argument>, …)
<condition>

an expression that returns a single indicator.

<template>

the content to display (see DISPLAY).

<template-name>, <argument>

an invocation of a callable template (see Template invocation).

A conditional display is made of one or more WHEN clauses, followed by at most one OTHERWISE clause. It takes the place of DISPLAY <template> in a template line, and the semicolon follows the last clause. Either all its clauses display content, or all of them invoke a callable template.

For each occurrence of the context, EFX evaluates the conditions in order, with that occurrence as context. It displays the content of the first clause whose condition is true. When no condition is true, it displays the content of the OTHERWISE clause. Without an OTHERWISE clause, it displays nothing.

In the OTHERWISE clause, you can leave out the keyword DISPLAY.

Each clause can start on a new line of the file.

The conditions apply to the content of the template line only. EFX displays the template lines nested under it whatever the result of the conditions.

Restrictions

  • A conditional display starts with a WHEN clause. An OTHERWISE clause on its own is an error.

  • A conditional display has at most one OTHERWISE clause, and it is the last clause.

  • A template line has either a DISPLAY or a conditional display: DISPLAY <template> followed by a WHEN clause is an error.

  • A conditional display cannot mix DISPLAY and INVOKE: WHEN … INVOKE t() OTHERWISE DISPLAY … is an error. A template line either displays content or invokes a callable template, in all its clauses.

Examples

WITH BT-00-Number
  WHEN BT-00-Number > 100 DISPLAY #{name}: high
  WHEN BT-00-Number > 10 DISPLAY #{name}: medium
  OTHERWISE DISPLAY #{name}: low;

Three cases. For a value of 500, the first condition is true, so EFX displays high.

WITH BT-00-Number WHEN BT-00-Number > 0 DISPLAY positive OTHERWISE zero or negative;

An OTHERWISE clause without the keyword DISPLAY.

WITH BT-00-Indicator WHEN BT-00-Indicator DISPLAY #{name};

Displays the name of the field only when its value is true. Otherwise, it displays nothing.

--- TEMPLATE show-number ---
LET number:$value;
DISPLAY #{name|BT-00-Number}: ${$value};
--- TEMPLATE show-none ---
DISPLAY #{name|BT-00-Number}: -;
--- MAIN ---
WITH BT-00-Number
  WHEN BT-00-Number > 0 INVOKE show-number(BT-00-Number)
  OTHERWISE INVOKE show-none();

Clauses that invoke callable templates.

From the SDK (view-templates/1.efx)
		WITH BT-16-Organization-Company WHEN BT-16-Organization-Company:isMasked DISPLAY #{name}: #{auxiliary|text|undisclosed} OTHERWISE DISPLAY #{name}: $value; // Organization Part Name

A template line nested two levels deep in its file. It displays a text that stands in for the value of the field when that value is masked (see Field property).

Conditional display is new in EFX-2.

Template invocation

INVOKE displays a callable template, with arguments that give the values of its parameters.

Syntax
INVOKE <template-name>(<argument>, <argument>, …)
INVOKE <template-name>()
WHEN <condition> INVOKE <template-name>(<argument>, …) … OTHERWISE INVOKE <template-name>(<argument>, …)
<template-name>

the name of a callable template (see Template section).

<argument>

an expression. You give one argument for each parameter of the callable template, in the same order.

<condition>

an indicator, as in a conditional display.

A template invocation takes the place of DISPLAY <template> in a template line, in a template section and in the main, summary and navigation sections. With WHEN clauses, the first clause whose condition is true chooses the callable template. When no condition is true, EFX uses the OTHERWISE clause. Without that clause, it displays nothing.

EFX displays the callable template in the place of the template line that invokes it, and the line displays nothing of its own. The lines at the top of the callable template appear one after the other at the level of the invoking line, and the lines nested in them below it. So the invoking line is not a level of its own in the displayed notice, and the lines of the template take its place in the outline. A heading of the template receives the address of the nearest heading above the invoking line, in front of its own address (see Heading).

EFX displays the callable template once for each occurrence of the context of the invoking line. Each time, it evaluates the arguments with that occurrence as context, and displays the callable template with these values.

Each argument must have the type of the matching parameter. You can pass a single value to a parameter of a sequence type.

Restrictions

  • You must declare the callable template before the template invocation. So a template section can invoke only the templates of the earlier sections.

  • A callable template cannot invoke itself, directly or through other templates.

  • A line that invokes a callable template cannot be a heading, so it has no outline number, ?, # or tag. To give the content of a template a heading, write the heading in the template, or invoke the template from a line nested under the heading.

  • A line that invokes a callable template cannot have nested template lines. Write these lines in the template, or under another line.

  • You must write the parentheses, also when the callable template has no parameters.

  • The number of arguments must be the number of parameters.

  • You cannot pass a sequence to a parameter of a single-value type.

Examples

--- TEMPLATE show-number ---
LET number:$value;
DISPLAY #{name|BT-00-Number}: ${$value};
--- MAIN ---
WITH BT-00-Number INVOKE show-number(BT-00-Number);
WITH ND-Root INVOKE show-number(count(BT-00-Repeatable-Text));
INVOKE show-number(42);

The same callable template invoked with a field, with a computed value and with a literal.

--- TEMPLATE texts ---
LET text*:$values;
DISPLAY ${$values};
--- MAIN ---
WITH ND-Root INVOKE texts(BT-00-Repeatable-Text);
WITH BT-00-Text INVOKE texts(BT-00-Text);

A sequence parameter receives a sequence, or a single value.

--- TEMPLATE sub-node ---
#sub-node DISPLAY #{auxiliary|text|notice-information};
	WITH BT-01-SubNode-Text DISPLAY $value;
--- MAIN ---
1 DISPLAY Notice;
	WITH ND-SubNode INVOKE sub-node();

EFX displays the template in the place of the invoking line, which is nested under the heading 1. So the heading of the template is at level 2, with the navigation address 1_sub-node.

From the SDK (view-templates/E1.efx)
			WITH OPT-301-Lot-ReviewOrg INVOKE role-and-name('auxiliary|text|organisation-review', OPT-301-Lot-ReviewOrg); // Review organisation (Lot)

A template line nested three levels deep in its file. The callable template role-and-name is declared at the start of the file.

Template invocation is new in EFX-2.

Line terminator and line joining

A semicolon ends a template line. Inside template text, a backslash at the end of a line of the file continues the text on the next line.

Syntax
<template-line>;
<text> \
<continued-text>
<text>, <continued-text>

template text before and after the line joining.

The semicolon ends a template line written with DISPLAY, a conditional display or INVOKE, and every declaration. A comment can follow it on the same line of the file.

A template line can take several lines of the file. In the parts that contain expressions, an end of line is white space, like a space. These parts are the context declaration, the conditions, the arguments and the expression blocks. Each WHEN and OTHERWISE clause can start on a new line.

Template text does not continue by itself on the next line. To continue template text on the next line, end the line with a backslash (\). EFX removes the backslash, the end of line and the white space at the start of the next line, but keeps the white space before the backslash. You can join several lines in this way.

Restrictions

  • A template line written in the EFX-2 form without its semicolon is an error.

  • The backslash that joins lines must be the last character of the line, apart from spaces and tabs.

  • You cannot write a semicolon in template text, because it ends the template line. Use the character reference &#59; instead (see Escape sequences and character references).

Examples

WITH BT-00-Text DISPLAY This text is long, so it continues \
                        on the next line;

Displays This text is long, so it continues on the next line.

WITH BT-00-Number
  WHEN BT-00-Number > 0 DISPLAY positive
  OTHERWISE DISPLAY zero or negative;

A template line on three lines of the file, ended by one semicolon.

WITH BT-00-Text DISPLAY ${concat(BT-00-Text,
                                  ' (',
                                  BT-00-Code,
                                  ')')};

An expression block on several lines needs no backslash.

In EFX-1, a template line ended at the end of the line of the file. Line joining is new in EFX-2.