Witten
Bainbridge
Nichols
HOME HELP PREFERENCES SEARCHFIGURESTABLES

Conditional expressions

Item

Description

{If}{[metadata], action-if-non-null, action-if null}

If the value of this metadata element is defined, output the first clause, otherwise output the second clause. Either clause may be empty

{If}{[metadata] op value, action-if-true, action-if-not-true}

Conditional expressions can be string comparisons, or numeric comparisons. Valid operators are:

String

Numeric

Meaning

eq

==

equals

ne

!=

not equals

gt

>

greater than

ge

>=

greater than or equal to

lt

<

less than

le

<=

less than or equal to

sw


starts with


ew


ends with


{Or}{[metadata], [metadata2], [metadata3]...}

Evaluate metadata items in turn and output the first one that exists. The last can be plain text, which always exists.

nested If/Or

{If} can be arbitrarily nested; {Or} can have another conditional as its final option


Table 10.3: Conditional expressions;