Artima新闻:Ryan Tomayko发布Kid 0.5
2005-01-28 10:09
309 查看
Ryan Tomayko发布了Kid0.5版。Kid是一个基于XML的Python模板语言的开源项目. 你可以利用Kid项目在XML中嵌入Python语言,利用动态语言的强大能力轻松完成工作。一个明显应用将是在web环境下,就象PHP所做的那样。
Ryan Tomayko has posted Kid 0.5, "a simple Pythonic template language for XML based vocabularies. It was spawned as a result of a kinky love triangle between XSLT, TAL, and PHP." The language is based on just six attributes:
Ryan Tomayko has posted Kid 0.5, "a simple Pythonic template language for XML based vocabularies. It was spawned as a result of a kinky love triangle between XSLT, TAL, and PHP." The language is based on just six attributes:
kid:for,
kid:if,
kid:def,
kid:content,
kid:omit, and
kid:replace; each of which contains a Python expression. Since this expression can point to externally defined functions, this is most of what you need. In addition there are attribute value templates similar to XSLT's, and
<?python?>processing instructions can embed code directly in the XML document. I'm not sure I approve of the use of processing instructions in the language, but I'm not sure I don't either. Not having to escape XML-significant symbols like
<and
&in the embedded code is convenient. Kid templates are compiled to Python byte-code and can be imported and invoked like normal Python code. Kid templates generate SAX events and can be used with existing libraries that work along SAX pipelines. This release changes the license from GPL to MIT. Overall it looks like a fairly well-designed, well-thought out system that has clearly learned from the mistakes of gnarly systems like PHP, JSP, and ASP.
相关文章推荐
- 动态新闻发布的实现及其技巧
- 开源新闻速递:Linux Mint 18 "Sarah" 正式发布
- 新闻发布系统架构
- 新闻发布系统
- 新闻发布系统:分页
- 基于Apache SSI和JSP技术的CMS新闻列表静态+动态发布解决方案
- 发布NBearV3.0.5 beta包括SDK文档
- 新闻发布生成静态页面的思考
- 新闻发布系统初步总结
- 开源新闻速递:天文软件 Stellarium 0.15.0 发布
- 用ASP.NET做一个自己的新闻发布RSS
- 项目手记 (三) 牛腩新闻发布系统中期总结
- 【新闻发布系统】网站发布问题整理
- 开源新闻速递:Tor 0.2.8.6 发布,可以保护用户不被监控追踪
- 【BS学习】牛腩新闻发布系统——设计说明书
- 新闻发布系统
- 开源新闻速递:最新的 BlackArch Linux ISO 镜像文件发布
- [新闻]Ubuntu7.04于4月19日全球同步发布
- XproerCMS(新闻管理系统)发布
- 新闻发布网页-2