Changes between Version 11 and Version 12 of GenshiFaq
- Timestamp:
- Jul 15, 2006, 2:18:44 PM (18 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
GenshiFaq
v11 v12 32 32 We think that Kid represents a huge step forward for XML-based templating in Python. [http://kid-templating.org/language.html#match-templates-py-match Match templates] and the generator-based processing model are extremely powerful concepts. 33 33 34 But arguably Kid also has some basic design problems. For example, Kid generates Python code from templates, which adds a lot of complexity to the code and can make the process of locating and fixing template errors a true nightmare. A syntax error in a template expression will cause an exception that points somewhere in the generated code. In addition, as Kid is based on [http://effbot.org/zone/element-index.htm ElementTree], and the !ElementTree API doesn't provide location information for parse events, exceptions reported by Kid often don't include information about what part of the template caused the error. 34 But arguably Kid also has some basic design problems. For example, Kid generates Python code from templates, which adds a lot of complexity to the code and can make the process of locating and fixing template errors a true nightmare. A syntax error in a template expression will cause an exception that points somewhere in the generated code. In addition, as Kid is based on [http://effbot.org/zone/element-index.htm ElementTree], and the !ElementTree API doesn't provide location information for parse events, exceptions reported by Kid often don't include information about what part of the template caused the error. (To be fair, this kind of location tracking wasn't even available in the Python bindings for Expat before Python 2.4.) 35 35 36 36 We felt these problems would best be addressed by developing a new engine form scratch, as opposed to trying to “fix” Kid. … … 58 58 59 59 Furthermore, XInclude is a W3C standard, which means that it is more likely to be supported in authoring tools than some esoteric custom notation for including external resources. 60 61 == What do I need to use Markup? == 62 63 Python 2.3 or later. Python 2.4 is recommended for better performance, plus error messages will include template line numbers and offset. [http://peak.telecommunity.com/DevCenter/setuptools Setuptools] is optional and only used for installation if it's available. 64 65 The template engine plugin (for http://www.turbogears.org/docs/plugins/template.html), which enables usage of Markup in frameworks such as [http://www.turbogears.com/ TurboGears], depends on Setuptools at runtime and installation time. Use of the plugin implementation is optional, though: Setuptools is ''not'' required for using Markup directly.