Text Template Glossary

This is a list of terms relating to Text Templates.

A

  • artifact
    The result of a template transformation. Artifacts include all text output, such as source code, XML, reports, and the domain-specific language definition.

  • assembly directive
    A directive that instructs the text template engine to include a particular assembly when the engine compiles and runs the transformation code. Assembly directives are used to enable references to types that are defined in other assemblies.

B

  • built-in directive
    A directive that is processed by the text templating engine. The five built-in directives are: the template directive, the include directive, the import directive, the assembly directive, and the output directive.

C

  • class feature
    A section of a text template in which reusable code is specified. A class feature can be added to the template generation class for use by other code blocks in the template.

  • culture parameter
    The parameter of a text template directive that specifies the culture for which the generated file is written.

  • custom directive
    A text template directive that the template engine redirects to a custom directive processor. Custom directives are used to add custom code to the code generation process.

  • custom directive processor
    A code plug-in that handles code generation for a specific set of custom directives.

D

  • directive
    An instruction in a text template that tells the engine and the host how to process the template.

  • directive processor
    A component that is registered with the text templating host to process directives in a text template. When the engine identifies a custom directive in the text template, it asks the host for a directive processor that can process the directive.

G

  • generated text output
    The output from a text template transformation.

  • generated transformation class
    The .NET class that is generated from a text template. This class inherits from the TextTransformation class.

H

  • host
    A component that manages the template transformation process by using the text template contents to invoke the engine, providing directive processors to the engine, and giving the engine access to file contents and the environment. Visual Studio is one of the many possible hosts of the text templating engine.

M

  • model
    A file read by one or more text templates in order to generate code. A model captures information about an aspect of the high-level design or business requirements, and the templates translate this information into implementation code. A model can be a file of any sort, but it can be in a notation such as UML, or it can be created by Domain-Specific Language Tools.

T

  • template directive
    A built-in directive that specifies basic information for executing the transformation. The information includes the base class to use for the generated transformation class, the programming language to use in the text template (Visual C# or Visual Basic), the culture to use when culture-specific versions of ToString are called, and whether to run the transformation in debug mode or release mode.

  • text template
    A file that is the input to the text transformation process. It contains text blocks and control logic. When a text template is transformed, the control logic combines the text blocks with model data to produce an output file. Text templates are used to create text artifacts such as code files and HTML reports.

  • text template transformation
    The process of using a text template to generate output text.

  • text template transformation engine
    The main component in the text transformation process. It parses the text template, generates a Visual C# or Visual Basic class from it, compiles it, and runs it to generate the output string.

See Also

Other Resources

Domain-Specific Language Tools Glossary