Difference between revisions of "EPScript/XML Syntax"
m |
|||
Line 1: | Line 1: | ||
− | {{Navigate | + | {{Navigate|Section=EPScript|Prev=Functions|Next=Examples|Curr=XML Syntax}} |
= XML Syntax = | = XML Syntax = |
Revision as of 15:31, 4 October 2006
EPScript | ||||||
← Functions | XML Syntax | Examples → | ||||
|
Contents
XML Syntax
Control Structures
if
Inserts the content of the <if> element if the EPScript in the test attribute returns true.
<if test="date_effective">(<print expr="date_effective" opts="res=year" />)</if>
choose/when/otherwise
A <choose> element consists of one or many <when> elements and an optional <otherwise> element. The test attribute of each <when> element is evaluated, and if this returns true the content is included and execution leaves the <choose> structure. If no test attribute returns true and an <otherwise> element is provided, the content of the <otherwise> element is included.
<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>