Template Elements and Attributes
This section lists the valid XML elements and attributes that you can use when creating or modifying templates. See the demo templates for examples.
Conditional Elements
The following table lists the valid conditional elements.
Element | Description |
---|---|
<keyview>
|
The KeyView XML template container ("root") element |
<if*>
|
If the condition from the comparison is true, process the XML. Conditions can be nested up to 25 levels deep. Attributes
|
<ifex>, <ifnx>
|
If The Notes item might have a value that cannot be converted to text, such as an image. |
<ifeq>, <ifne>, <iflt>, <ifle>, <ifgt>, <ifge>
|
Respectively, if Text comparison uses a case-insensitive string compare. |
<iftdeq>, <iftdne>, <iftdlt>, <iftdle>, <iftdgt>, <iftdge>
|
Respectively, if time/date Time/date comparison converts dates to text in local time using the Notes default, text="06/30/2005 02:52:04 PM" |
<iftzeq>, <iftzne>
|
Respectively, if the time zone equals or does not equal the comparison text , for example CDT , EST , and so on. |
<ifini>
|
If the value of the INI option specified in name equals the text value. |
<else>
|
If the condition from the last <if> or <switch> was false, process XML. |
<switch>
|
If a Attributes
|
<case>
|
If the comparison condition is true, process XML, then stop processing the rest of Attributes
|
<default>
|
If all <case> conditions were false, process XML. This element must be the last element in <switch> , after all the <case> elements. Any <case> elements after the <default> element are ignored. |
<for>
|
If a Attributes
|
<index>
|
Output <for> loop index (1-based). <index> is only valid within a <for> element. |
Control Elements
The following table lists the valid control elements.
Element | Description |
---|---|
<call>
|
Call another XML template. You can nest templates up to 10 levels deep. Attributes
|
<log>
|
Log message to the NSF log file. Attributes
|
<quit>
|
Stop processing the template. Exits without error. Attributes
|
<stop>
|
Stop processing the template. Exits with an Attributes
|
Data Elements
The following table lists the valid data elements.
Element | Description |
---|---|
<text>
|
Output text. Attributes
|
<rich>
|
Output rich text (MHTML). Images are output in the next part or parts of the MHTML, after the first Attributes
|
<body>
|
Output the message body in rich text (MHTML). As with <rich>, images are output in the next part or parts of the MHTML. |
<form>
|
Output the message form (usually Attributes
|
<addr>
|
Output an address. Attributes
|
<name>
|
Output the name of the last name item, or in other words the current main item. The item must exist. |
<format>
|
Set the default format for Attributes
where Separate multiple formats with commas. For example:
|
<date>
|
Output a Notes date. Attributes
|
<date_kv>
|
Output a KeyView date. Attributes
|
<time>
|
Output a time range, for example 1 hour, 30 minutes. Attributes
|
<zone>
|
Output a Notes time zone mnemonic, for example Attributes
|
<zone_utc>
|
Output a time zone as UTC, for example (UTC-06:00) . |
<logo>
|
Output the mail header logo. The image link is included in the output; the actual image is output to a different part of the MHTML subfile. |
<image>
|
Output an image. The image link is included in the output; the actual image is output to the MHTML next part, as with <rich> and <body>. |
<image_uri>
|
Output an image URI, in quotation marks. The actual image is output to a different part of the MHTML subfile. Attributes
|