Differences between revisions 1 and 2
Revision 1 as of 2008-08-27 11:15:57
Size: 3594
Editor: lizzie
Comment:
Revision 2 as of 2008-09-05 08:28:44
Size: 3822
Editor: qingfeng
Comment:
Deletions are marked like this. Additions are marked like this.
Line 1: Line 1:
## Do not edit this header. It is not part of the wiki code and will not be
## posted back to the wiki when you save.
## Base: http://wiki.woodpecker.org.cn/moin/
## Page: ObpLovelyPython/PCS309
## Secs:
## END OF HEADER

status

草稿

清风; 100%

TableOfContents

Pyhton 模板系统

GenShi

[http://genshi.edgewall.org http://www.edgewall.org/gfx/genshi_logo.png]

  • 特点:解释型模板,纯粹面向 xml,流式的处理机制,能够嵌入 python 语句和表达式,提供强大的功能。
  • 从 Kid 发展而来,比 Kid 更灵活,性能也更好,实现部分 XPath,XInclude 规范。
  • TurboGears 默认的模板引擎将从 Kid 转为 GenShi

MaKo

[http://www.makotemplates.org/ http://www.makotemplates.org/images/makoLogo.png]

  • 特点:编译型模板,卓越的性能,将 Python 语言优雅得植入模板中,功能强大。
  • 由 Myghty 发展而来,是对 Myghty 的重新设计和重新实现,类似 GenShi 和 Kid 的关系。

  • PyLons 默认的模板引擎将从 Myghty 转为 MaKo

JinJa

[http://jinja.pocoo.org/ http://jinja.pocoo.org/static/jinjabanner.png]

ClearSilver

ClearSilver是一个高性能的模版系统,让我们看看他的使用网站,就知道他的表现有多好。

  • Bloglines
  • Google Groups
  • Yahoo Groups

http://www.clearsilver.net/img/misc/Clearsilver-Architecture.gif

印度豹

http://www.cheetahtemplate.org/cheetah-face-black-medium.jpg CheetahTemplateOrg -- 一个历史悠久的JAVA 模板系统的衍生,可以生成一切文本文件

Myghty Google 的利器

attachment:myghty_small.png MyghtyOrg -- 一个高速模板系统,几乎可以独立作为web 应用平台来使了

Kid

[http://kid.lesscode.org/ Kid] 是一种简单的基于 XML 的模板语言,它使用嵌入的 Python 语句来对某些元素进行处理,它的语法借鉴了许多现存的模板语言,诸如 XSLT、TAL、PHP等等。

Kid 的设计目标是为了简化 Python 对 XML 文档的处理。同其它 XML 工具相比:

  • SAX、DOM、ElementTree 等 API 可以保证输出是组织良好的,但要求文档必须用 Python 创建。

  • Cheetah、PTL 等模板语言很容易使用,但不能保证输出结果是组织良好的。
  • XSLT 提供了许多函数来产生良好的 XML 文档,但要求所有输入必须是 XML 文档格式,用起来也不怎么简便。

Kid 则试图结合所有上述技术的优点。

Kid 可以用来产生任何形式的 XML 文档,包括 XHTML、RSS、Atom、FOAF、RDF、XBEL、XSLT、RelaxNG、Schematron、SOAP 等等。

其它

PyWork - [http://pywork.sourceforge.net/ http://pywork.sourceforge.net]

Cheetah - http://www.unrealtower.org/mycheetah

Subway - http://subway.python-hosting.com/

Spyce - [http://spyce.sf.net/ http://spyce.sf.net]

ObpLovelyPython/PCS309 (last edited 2009-12-25 07:14:11 by localhost)