Template processor

Such features include: While template processors are typically a separate piece of software, used as part of a system or framework, simple templating languages are commonly included in the string processing features of general-purpose programming languages, and in text processing programs, notably text editors or word processors.Substitution commands are of the form s/regexp/replacement/, where regexp is a regular expression, for parsing input, and replacement is a simple template for output, either literal text, or a format string containing the characters & for "entire match" or the special escape sequences \1 through \9 for the nth sub-expression.All template processing systems consist of at least these primary elements: This may be a relational database, a source file such as XML, an alternate format of flat file database, a spreadsheet or any of other various sources of preformatted data.Programming languages such as Perl, Python, PHP, Ruby, C#, Java, and Go support template processing either natively, or through add-on libraries and modules.Moreover, template processing is sometimes included as a sub-feature of software packages like text editors, IDEs and relational database management systems.
A diagram illustrating all of the basic elements and processing flow of a template engine.
softwaredata modeldocumentsprogramsweb pagessource codesource code generationweb template systemapplication frameworkpreprocessorfilterhigh-level programming languagesplain textvariablesfunctionstransclusiongeneral-purpose programming languagestext editorsword processors‘printf’ print format stringssnippetssource code editorstemplatesmail mergeparsingregular expressionescape sequencesrelational databaseflat file databasespreadsheetpipelinetext filestreamsoftware applicationprogramming languageweb developmentcomputer programmersComparison of web template enginesweb documentsProgramming languagesPythonJavaServer PagesActive Server PagesGenshirelational database management systemsDocument automationDocument modellingDomain-specific programming languageInternationalization and localizationCommon Locale Data RepositorygettextLayout enginesMacro (computer science)computer languageArchitecture descriptionHardware descriptionKnowledge representationMarkupModelingShadingSpecificationStylesheetTransformationList of programming languages by type