Template Syntax


A transformation, implemented by a TemplateTransformModel, looks like this:

<transform transforms.htmlEscape>
  <p>This is a sample paragraph in HTML</p>

The transform tag takes one argument: the transformation to be used for the text inside the transform tags.

When you put transform tags around a section of a template, text that would otherwise be sent to the output is first passed through the appropriate transformation. The result of the transformation is then sent to the output as normal. Any of the normal FM-Classic syntax can be used inside a transform section. Transforms can also be fed into other transforms.

Transforms can be useful whenever you need to apply a transformation prior to output. For instance, if you needed to take an ASCII string, and insert it inside an XML output stream, you could do the following:

<transform utility.compressWhitespace>
<transform utility.xmlEscape>

The result is: ${master.results}.