Mercurial > genshi > mirror
annotate ChangeLog @ 316:a946edefac40 trunk
Configurable encoding of template files, closing #65.
* The `XMLParser` constructor now accepts an optional encoding parameter.
* The `MarkupTemplate` and `TextTemplate` class also get an encoding parameter in their initializers.
* A `default_encoding` can be specified when creating a `TemplateLoader` instance, but the encoding can also be specified explicitly when calling the `load()` method.
* Encodings specified using an XML declaration in templates and XML files are now honored (as long as Expat supports them, that is, and it doesn't support many).
author | cmlenz |
---|---|
date | Tue, 24 Oct 2006 15:52:57 +0000 |
parents | 53d502c7c874 |
children | efa7870b63cb |
rev | line source |
---|---|
276 | 1 Version 0.4 |
2 http://svn.edgewall.org/repos/genshi/tags/0.4.0/ | |
3 (?, from branches/stable/0.4.x) | |
4 | |
5 * New example applications for CherryPy and web.py. | |
6 * The template loader now uses a LRU cache to limit the number of cached | |
7 templates to a configurable maximum. Also, a race condition in the template | |
8 loader was fixed by adding locking. | |
9 * A new filter (genshi.filters.HTMLFormFiller) was added, which can populate | |
10 HTML forms based on a dictionary of values. | |
277
7e30bfa966ab
The `HTMLSanitizer` now lets you override the default set of tag and attribute names that are considered safe.
cmlenz
parents:
276
diff
changeset
|
11 * The set of permitted tag and attribute names for the HTMLSanitizer can now |
7e30bfa966ab
The `HTMLSanitizer` now lets you override the default set of tag and attribute names that are considered safe.
cmlenz
parents:
276
diff
changeset
|
12 be configured per instance. |
294 | 13 * The template engine plugin now supports a range of options for |
14 configuration, for example to set the default serialization method, the | |
15 default output encoding, or the default DOCTYPE. | |
302 | 16 * The ElementTree adaptation function `ET()` has moved into the `genshi.input` |
17 module. | |
18 * Allow `when` directives to omit the test expression as long as the | |
19 associated choose directive does have one. In that case, the when branch is | |
20 followed if the expression of the choose directive evaluates to a truth | |
21 value. | |
285 | 22 |
23 | |
288
e09c5b7a64ae
Fix bug introduced in [343], that broke the parsing of templates which declare the same namespace more than once in a nested fashion. Thanks to Graham Higgins for reporting the problem.
cmlenz
parents:
285
diff
changeset
|
24 Version 0.3.3 |
e09c5b7a64ae
Fix bug introduced in [343], that broke the parsing of templates which declare the same namespace more than once in a nested fashion. Thanks to Graham Higgins for reporting the problem.
cmlenz
parents:
285
diff
changeset
|
25 http://svn.edgewall.org/repos/genshi/tags/0.3.3/ |
302 | 26 (Oct 16 2006, from branches/stable/0.3.x) |
288
e09c5b7a64ae
Fix bug introduced in [343], that broke the parsing of templates which declare the same namespace more than once in a nested fashion. Thanks to Graham Higgins for reporting the problem.
cmlenz
parents:
285
diff
changeset
|
27 |
e09c5b7a64ae
Fix bug introduced in [343], that broke the parsing of templates which declare the same namespace more than once in a nested fashion. Thanks to Graham Higgins for reporting the problem.
cmlenz
parents:
285
diff
changeset
|
28 * Fixed bug introduced in 0.3.2 that broke the parsing of templates which |
e09c5b7a64ae
Fix bug introduced in [343], that broke the parsing of templates which declare the same namespace more than once in a nested fashion. Thanks to Graham Higgins for reporting the problem.
cmlenz
parents:
285
diff
changeset
|
29 declare the same namespace more than once in a nested fashion. |
294 | 30 * Fixed the parsing of HTML entity references inside attribute values, both |
31 in the `XMLParser` and the `HTMLParser` classes. | |
302 | 32 * Some changes to usage of absolute vs. relative template paths to ensure that |
33 the filenamed-keyed cache employed by the TemplateLoader doesn't mix up | |
34 templates with the same name, but from different subdirectories. | |
288
e09c5b7a64ae
Fix bug introduced in [343], that broke the parsing of templates which declare the same namespace more than once in a nested fashion. Thanks to Graham Higgins for reporting the problem.
cmlenz
parents:
285
diff
changeset
|
35 |
e09c5b7a64ae
Fix bug introduced in [343], that broke the parsing of templates which declare the same namespace more than once in a nested fashion. Thanks to Graham Higgins for reporting the problem.
cmlenz
parents:
285
diff
changeset
|
36 |
285 | 37 Version 0.3.2 |
38 http://svn.edgewall.org/repos/genshi/tags/0.3.2/ | |
39 (Oct 12 2006, from branches/stable/0.3.x) | |
40 | |
41 * Exceptions from templates now contain the absolute path to the template file | |
42 when a search path is used. This enables tracebacks to display the line in | |
43 question. | |
44 * The template engine plugin now provides three different types: "genshi" and | |
45 "genshi-markup" map to markup templates, while "genshi-text" maps to text | |
46 templates. | |
278
d6c58473a9d0
Fix the handling of namespace context for match templates.
cmlenz
parents:
277
diff
changeset
|
47 * Fixed the namespace context used by XPath patterns in py:match templates. |
d6c58473a9d0
Fix the handling of namespace context for match templates.
cmlenz
parents:
277
diff
changeset
|
48 The were erroneously using the namespace context of the elements being |
d6c58473a9d0
Fix the handling of namespace context for match templates.
cmlenz
parents:
277
diff
changeset
|
49 matched, where they should rather use the context in which they were |
d6c58473a9d0
Fix the handling of namespace context for match templates.
cmlenz
parents:
277
diff
changeset
|
50 defined. |
285 | 51 * The contents of `<script>` and `<style>` elements are no longer escaped when |
280
ce848f7c41f1
The content of `<script>` and `<style>` elements is no longer escaped when serializing to HTML but declaring the XHTML namespace in the template.
cmlenz
parents:
278
diff
changeset
|
52 serializing to HTML but declaring the XHTML namespace in the template. |
285 | 53 * Improved error message raised when using the `py:for` directive on an object |
54 that is not iterable (ticket #60). | |
55 * Fixed the XPath function `starts-with()` which was always returning true | |
56 (ticket #61). | |
276 | 57 |
58 | |
260 | 59 Version 0.3.1 |
60 http://svn.edgewall.org/repos/genshi/tags/0.3.1/ | |
262 | 61 (Sep 22 2006, from branches/stable/0.3.x) |
260 | 62 |
63 * Includes and user-defined filters were not getting the correct context data | |
64 when used inside a match template (ticket #56). | |
65 * XPath patterns using the union operator (`|`) were returning only partial | |
66 results in some cases. | |
67 | |
68 | |
192
b64e36bc1100
Expression evaluation now differentiates between undefined variables and variables that are defined but set to `None`.
cmlenz
parents:
185
diff
changeset
|
69 Version 0.3 |
230 | 70 http://svn.edgewall.org/repos/genshi/tags/0.3.0/ |
252 | 71 (Sep 17 2006, from branches/stable/0.3.x) |
192
b64e36bc1100
Expression evaluation now differentiates between undefined variables and variables that are defined but set to `None`.
cmlenz
parents:
185
diff
changeset
|
72 |
234 | 73 * The project name was changed from "Markup" to "Genshi". See UPGRADE.txt |
74 for upgrade instructions. | |
192
b64e36bc1100
Expression evaluation now differentiates between undefined variables and variables that are defined but set to `None`.
cmlenz
parents:
185
diff
changeset
|
75 * Expression evaluation now differentiates between undefined variables and |
b64e36bc1100
Expression evaluation now differentiates between undefined variables and variables that are defined but set to `None`.
cmlenz
parents:
185
diff
changeset
|
76 variables that are defined but set to `None`. This also means that local |
b64e36bc1100
Expression evaluation now differentiates between undefined variables and variables that are defined but set to `None`.
cmlenz
parents:
185
diff
changeset
|
77 variables can override built-ins even if the local variable are set to |
b64e36bc1100
Expression evaluation now differentiates between undefined variables and variables that are defined but set to `None`.
cmlenz
parents:
185
diff
changeset
|
78 `None` (ticket #36). |
199
71ce4b5335ba
* Removed storage of substream in `MatchDirective`, because it's already being stored in the match templates (related to #39).
cmlenz
parents:
192
diff
changeset
|
79 * The plugin implementation now makes more functions available for use inside |
71ce4b5335ba
* Removed storage of substream in `MatchDirective`, because it's already being stored in the match templates (related to #39).
cmlenz
parents:
192
diff
changeset
|
80 templates: XML(), HTML(), defined(), and value-of(). These are mostly for |
71ce4b5335ba
* Removed storage of substream in `MatchDirective`, because it's already being stored in the match templates (related to #39).
cmlenz
parents:
192
diff
changeset
|
81 migration from Kid. |
192
b64e36bc1100
Expression evaluation now differentiates between undefined variables and variables that are defined but set to `None`.
cmlenz
parents:
185
diff
changeset
|
82 * The parsing of `py:with` directives has been improved: you can now assign |
b64e36bc1100
Expression evaluation now differentiates between undefined variables and variables that are defined but set to `None`.
cmlenz
parents:
185
diff
changeset
|
83 to multiple names, and semicolons inside string literals are treated as |
b64e36bc1100
Expression evaluation now differentiates between undefined variables and variables that are defined but set to `None`.
cmlenz
parents:
185
diff
changeset
|
84 expected. |
199
71ce4b5335ba
* Removed storage of substream in `MatchDirective`, because it's already being stored in the match templates (related to #39).
cmlenz
parents:
192
diff
changeset
|
85 * Generator expressions can now be used in template expressions (ticket #16). |
200
5861f4446c26
Add serialization to plain text, based on cboos' patch. Closes #41.
cmlenz
parents:
199
diff
changeset
|
86 * Added serialization to plain text (ticket #41). |
218 | 87 * Calling functions from template expressions with *args and/or **kwargs |
88 now works correctly (ticket #42). | |
89 * The `TemplateLoader` class and the `Template` instances that it manages are | |
90 now thread-safe, as they no longer keep any state related to the current | |
91 processing context. | |
92 * Stream filters and serializers can now be applied using the "pipe" (bitwise | |
93 or) operator "|". | |
94 * The execution of named template functions (`py:def`) no longer silently | |
95 swallows TypeError exceptions (ticket #44). | |
96 * The XML Parser now correctly handles unicode input (ticket #43). | |
97 * HTML entities can now be used in templates without having to declare an HTML | |
98 document type. | |
99 * Error reporting on undefined entities has been fixed. | |
100 * Fix traversal of substreams by XPath expressions. For example, the path | |
101 '*/*' no longer matches non-immediate child elements, and '@*' no longer | |
102 matches the attributes of descendants. | |
103 * Fixes for `py:match` which would get confused when it should be applied | |
104 to multiple elements (ticket #49). | |
224
90d62225f411
Implement support for namespace prefixes in XPath expressions.
cmlenz
parents:
218
diff
changeset
|
105 * Using namespace prefixes in XPath expressions is now supported. |
227
96a7e5011c69
Use list comprehension instead of `map()` in the AST transformer.
cmlenz
parents:
224
diff
changeset
|
106 * Expressions now correctly handle slices (ticket #51). |
234 | 107 * A simple text-based template language is now included for generating |
108 plain text output (ticket #47). | |
192
b64e36bc1100
Expression evaluation now differentiates between undefined variables and variables that are defined but set to `None`.
cmlenz
parents:
185
diff
changeset
|
109 |
b64e36bc1100
Expression evaluation now differentiates between undefined variables and variables that are defined but set to `None`.
cmlenz
parents:
185
diff
changeset
|
110 |
148
dcc9dc25bc59
Added changelog file, plus some README and setup tweaks.
cmlenz
parents:
diff
changeset
|
111 Version 0.2 |
230 | 112 http://svn.edgewall.org/repos/genshi/tags/0.2.0/ |
184
181d292eafa2
Interpolate multiline expressions in templates. Thanks to Christian Boos for reporting the problem and providing the fix.
cmlenz
parents:
181
diff
changeset
|
113 (Aug 22 2006, from branches/stable/0.2.x) |
148
dcc9dc25bc59
Added changelog file, plus some README and setup tweaks.
cmlenz
parents:
diff
changeset
|
114 |
153 | 115 * XPath syntax errors now contain position info (ticket #20). |
148
dcc9dc25bc59
Added changelog file, plus some README and setup tweaks.
cmlenz
parents:
diff
changeset
|
116 * Errors in expression evaluation now contain the correct line number in the |
153 | 117 template (ticket #22). |
148
dcc9dc25bc59
Added changelog file, plus some README and setup tweaks.
cmlenz
parents:
diff
changeset
|
118 * <script> and <style> element contents are no longer escaped when using HTML |
153 | 119 serialization (ticket #24). |
120 * In some cases expressions in templates did not get interpolated (ticket | |
121 #26). | |
148
dcc9dc25bc59
Added changelog file, plus some README and setup tweaks.
cmlenz
parents:
diff
changeset
|
122 * CDATA sections are now passed through the pipeline and serialized correctly. |
dcc9dc25bc59
Added changelog file, plus some README and setup tweaks.
cmlenz
parents:
diff
changeset
|
123 That allows using <script> or <style> elements in XHTML output that is still |
dcc9dc25bc59
Added changelog file, plus some README and setup tweaks.
cmlenz
parents:
diff
changeset
|
124 compatible with HTML user agents. |
159 | 125 * The XHTML serializer now correctly handles elements in foreign namespaces |
126 (such as SVG or MathML). | |
153 | 127 * Fixed relative includes in templates on Windows (ticket #27). |
160 | 128 * Output can be encoded using legacy codecs such as ISO-8859-1. Any character |
148
dcc9dc25bc59
Added changelog file, plus some README and setup tweaks.
cmlenz
parents:
diff
changeset
|
129 not representable in the chosen encoding gets replaced by the corresponding |
dcc9dc25bc59
Added changelog file, plus some README and setup tweaks.
cmlenz
parents:
diff
changeset
|
130 XML character reference. |
156 | 131 * String literals in XPath expressions that contain spaces are now parsed |
132 as expected. | |
133 * Added support for the XPath functions boolean(), ceiling(), concat(), | |
162
456039594db9
Implement the XPath relational operators and the `round()` function.
cmlenz
parents:
160
diff
changeset
|
134 contains(), false(), floor(), normalize-space(), number(), round(), |
456039594db9
Implement the XPath relational operators and the `round()` function.
cmlenz
parents:
160
diff
changeset
|
135 starts-with(), string-length(), substring(), substring-after(), |
456039594db9
Implement the XPath relational operators and the `round()` function.
cmlenz
parents:
160
diff
changeset
|
136 substring-before(), translate(), and true(). |
168 | 137 * Non-ASCII characters in expressions should now be handled correctly (ticket |
138 #29). | |
139 * Default values for arguments of template functions now also work with | |
140 constants and complex expressions (they only worked for string or number | |
141 literals before). | |
181
e103b75a96ce
Some error message improvements for template directives. Thanks to Christian Boos for the patch!
cmlenz
parents:
169
diff
changeset
|
142 * XPath expressions in now support XPath variables ($var) in predicates |
e103b75a96ce
Some error message improvements for template directives. Thanks to Christian Boos for the patch!
cmlenz
parents:
169
diff
changeset
|
143 (ticket #31). |
184
181d292eafa2
Interpolate multiline expressions in templates. Thanks to Christian Boos for reporting the problem and providing the fix.
cmlenz
parents:
181
diff
changeset
|
144 * Expressions in templates can now span multiple lines if they are enclosed |
181d292eafa2
Interpolate multiline expressions in templates. Thanks to Christian Boos for reporting the problem and providing the fix.
cmlenz
parents:
181
diff
changeset
|
145 in curly braces. |
185
95c3813a00de
Fix for #34: `py:def` macros can now be invoked from within expressions in attribute values.
cmlenz
parents:
184
diff
changeset
|
146 * py:def macros can now be invoked from within expressions inside attribute |
95c3813a00de
Fix for #34: `py:def` macros can now be invoked from within expressions in attribute values.
cmlenz
parents:
184
diff
changeset
|
147 values (ticket #34). |
148
dcc9dc25bc59
Added changelog file, plus some README and setup tweaks.
cmlenz
parents:
diff
changeset
|
148 |
169 | 149 |
148
dcc9dc25bc59
Added changelog file, plus some README and setup tweaks.
cmlenz
parents:
diff
changeset
|
150 Version 0.1 |
230 | 151 http://svn.edgewall.org/repos/genshi/tags/0.1.0/ |
148
dcc9dc25bc59
Added changelog file, plus some README and setup tweaks.
cmlenz
parents:
diff
changeset
|
152 (Aug 3 2006, from branches/stable/0.1.x) |
dcc9dc25bc59
Added changelog file, plus some README and setup tweaks.
cmlenz
parents:
diff
changeset
|
153 |
dcc9dc25bc59
Added changelog file, plus some README and setup tweaks.
cmlenz
parents:
diff
changeset
|
154 * First public release |