From Seo Wiki - Search Engine Optimization and Programming Languages
Genshi is a template engine for XML-based vocabularies written in
Python. Genshi is used to easily insert generated output into XML-based languages, usually HTML, and reuse elements between documents. Genshi is based on Kid and aims to implement some of its functionality while processing templates faster.
Genshi's can be used with several Python web frameworks, such as CherryPy , TurboGears, Pylons and web2py. Genshi will eventually replace Kid in the TurboGears web framework.
Genshi makes use of namespaces to embed instructions into HTML. A typical instruction is given as an attribute, with a Python expression inside the quotes. For example, the following will render a paragraph that shows 4:
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:py="http://genshi.edgewall.org/">
<p py:content="2 + 2">This will be replaced with 4</p>
Because of the use of namespaces, Genshi can be used in WYSIWYG HTML editors.
Differences between Kid and Genshi
- Genshi directly interprets templates (unlike Kid, which generates Python code)
- Genshi uses XInclude for template reuse
- Genshi adds attributes Kid does not have, like