Edgewall Software

Changes between Version 5 and Version 6 of GenshiFaq


Ignore:
Timestamp:
Jul 7, 2006, 6:33:32 PM (18 years ago)
Author:
cmlenz
Comment:

typo fix

Legend:

Unmodified
Added
Removed
Modified
  • GenshiFaq

    v5 v6  
    2222== Why XML-based? ==
    2323
    24 Most template engines for web applications are character-stream based: they know nothing about the format of the text that is being generated. They simply substitute variable expressions, and provide some kind of directives looping, conditionals, etc. Thus they can be used to generate any kind of textual output, be it HTML, plain text emails, program code, or really anything else.
     24Most template engines for web applications are character-stream based: they know nothing about the format of the text that is being generated. They simply substitute variable expressions, and provide some kind of directives for looping, conditionals, etc. Thus they can be used to generate any kind of textual output, be it HTML, plain text emails, program code, or really anything else.
    2525
    2626However, 99% of the templates used by web applications generate some kind of XML/HTML-based markup. So we believe that web applications can benefit from a template engine that “knows what it's doing” when it comes to markup. You don't need to worry about generating output that is not well-formed, nor do you need to worry about accidentially not escaping some data, thereby greatly reducing the risk for introducing [http://de.wikipedia.org/wiki/Cross_Site_Scripting XSS] attack vectors. Furthermore, your templates look a lot more like the targetted output format: an HTML template looks like HTML, a template for an RSS feed looks like RSS. Directives in text-based template languages often result in rather messy templates, or produce excessive amounts of unnecessary white space.