Referencetemplate

<template>

The <template> component performs an operation on each of the <sources> within a <map>. See also: <map> documentation.

Attributes and Properties

Attributes for <template>
AttributeTypeValues
asList = "…""true" "false"
assignNames = "…"
createComponentOfType = "…"
numComponents = "…"
rendered = "…"boolean"true" "false"
Props for <template name="t">
PropertyType
$t.renderedboolean

Example: A counting <template>

The <template> defines the content to be repeated or mapped using values defined in the <sources> component. Here, a new paragraph containing an <m> and a <math> component is generated for each term in the sequence defined by the <sources> tag.


Example: <template> with <map> and parallel behavior

In this example, the <template> is used to generate a repeated <p> component (paragraph) with distinct <sources> within a <map>. The behavior attribute the <map> is set to "parallel" so that the two independent aliases are used simultaneously without combination.