EPScript/Data Types
Contents
EPScript
Data Types
Strings and characters
These are contained within either double quotes ("") or single quotes (''). There is no difference between the two, but it may be easier to use one sort when inside an XML attribute. For example:
<when test="type = 'patent'"> ... </when>
Numbers
Logical Operators
and
Returns true if both the left-hand and the right-hand expressions return true.
<if test="type = 'book' and is_set( creators )"> ... </if>
or
Returns true if at least one of the expressions returns true.
<if test="type = 'book' or type = 'patent'"> ... </if>
not
<if !is_set( creators )"> ... </if>
Comparison Operators
lt
<if test="length(editors) lt 6"> ... </if>
gt
<if test="length(editors) gt 1"> ... </if>
equals
<if test="type = 'patent'"> ... </if>
Control Structures
if
<if test="date_effective">(<print expr="date_effective" opts="res=year" />)</if>
choose/when/otherwise
<choose> <when test="title"><print expr="title" /></ep:when> <otherwise><print expr="type" /> #<print expr="eprintid" /></otherwise> </choose>
Procedures
Outputs the result of the provided expression attribute as a string. If the result is boolean, TRUE or FALSE will be produced.
<print expr="isbn" />
phrase
Outputs the phrase given in the ref attribute. To provide values for pins in the phrases, the param element is used, with the name attribute giving the pin name and the element content the value to pass.
<phrase ref="my_phrase"><param name="my_pin">Pin Value</param></phrase>