root/livinglogic.python.xist/NEWS.xml @ 3063:ed43c7b2e3a3

Revision 3063:ed43c7b2e3a3, 81.6 KB (checked in by Walter Doerwald <walter@…>, 12 years ago)

Fix typo.

Line 
1<?xml version='1.0' encoding='iso-8859-1'?>
2<section><title>Changes in 3.0 (released ??/??/2007)</title>
3<ulist>
4<item><par>The methods <method>__getitem__</method>, <method>__setitem__</method>
5and <method>__delitem__</method> for <class>Frag</class> and <class>Element</class>
6now support the new selectors, so you can do:</par>
7<ulist>
8<item><lit>del node[html.p]</lit> to delete all <class>html.p</class> child elements
9of <lit>node</lit>;</item>
10<item><lit>del node[html.p[2]]</lit> to delete only the third
11<class>html.p</class>;</item>
12<item><lit>node[xfind.hasclass("note")] = html.p("There was a note here!")</lit> to
13replace several child nodes with a new one;</item>
14<item><lit>for c in node[xfind.empty]: print c.bytes()</lit> to print all
15empty (element) children of <lit>node</lit>;</item>
16<item><lit>del node[node[0]]</lit> to delete the first child node (which is
17silly, but illustrates that you can pass a node to get/replace/delete
18that node);</item>
19</ulist>
20</item>
21
22<item><par>A new module <module>ll.xist.css</module> has been added which contains
23&css; related functionality: The generator function <function>iterrules</function>
24can be passed an &xist; tree and it will produce all &css; rules defined in any
25<class>html.link</class> or <class>html.style</class> elements or imported by them
26(via the &css; rule <lit>@import</lit>). This requires the <module>cssutils</module>
27package.</par>
28
29<par>The function <function>applystylesheets</function> modifies the &xist; tree
30passed in by removing all &css; (from <class>html.link</class> and <class>html.style</class>
31elements and their <lit>@import</lit>ed stylesheets) and putting the styles into
32<lit>style</lit> attributes of the affected elements instead.</par>
33
34<par>The function <function>selector</function> return a tree walk filter from
35a &css; selector passed as a string.</par>
36</item>
37
38<item>The <lit>media</lit> attribute of <class>html.link</class> and
39<class>html.style</class> now has a method <method>hasmedia</method>.</item>
40
41<item>The node method <method>asBytes</method> has been renamed to
42<method>bytes</method> and <method>bytes</method> has been renamed to
43<method>iterbytes</method>.</item>
44
45<item>The node method <method>asString</method> has been renamed to
46<method>string</method> and a new method <method>iterstring</method> has been
47added.</item>
48
49<item><class>ll.xist.ns.xml.XML10</class> is gone now. Use
50<class>ll.xist.ns.xml.XML</class> instead.</item>
51
52<item>A class attribute <lit>empty</lit> inside element classes will now no
53longer get converted into <lit>model</lit>.</item>
54
55<item><class>ll.xist.ns.doc.pyref</class> now copes better with decorated
56methods.</item>
57
58<item>The deprecated <class>Element</class> methods <method>hasAttr</method>,
59<method>hasattr</method>, <method>isallowedattr</method>, <method>getAttr</method>,
60<method>getattr</method>, <method>setDefaultAttr</method>,
61<method>setdefaultattr</method>, <method>attrkeys</method>,
62<method>attrvalues</method>, <method>attritems</method>,
63<method>iterattrkeys</method>, <method>iterattrvalues</method>,
64<method>iterattritems</method>, <method>allowedattrkeys</method>,
65<method>allowedattrvalues</method>, <method>allowedattritems</method>,
66<method>iterallowedattrkeys</method>, <method>iterallowedattrvalues</method>,
67<method>iterallowedattritems</method> and <method>copyDefaultAttrs</method>
68have been removed. The deprecated <class>Attrs</class> method
69<method>copydefaults</method> has been removed too.</item>
70
71<item>The namespace module <module>ll.xist.ns.cond</module> has been removed.</item>
72
73<item>When calling the function <function>ll.xist.parsers.parseURL</function>
74the arguments <arg>headers</arg> and <arg>data</arg> are now passed along
75to the parser's method only if they are specified. This makes it possible to
76pass ssh &url;s to <function>ll.xist.parsers.parseURL</function>.</item>
77
78<item>The methods <method>withnames</method> and <method>withoutnames</method> have
79been split into two that take Python names and two that take XML names.
80Multiple arguments are used now (instead of one argument that must be a sequence).
81Passing a namespace to remove all attributes from the namespace is no longer supported.</item>
82
83<item>The <class>Attrs</class> methods <method>updatenew</method> and
84<method>updatexisting</method> have been removed.</item>
85
86</ulist>
87</section>
88
89
90<section><title>Changes in 2.15.5 (released 07/17/2007)</title>
91
92<ulist>
93<item>The Python quotes example no longer contains the &xml; source
94or the generated &html;.</item>
95</ulist>
96
97
98<section><title>Changes in 2.15.4 (released 07/16/2007)</title>
99<ulist>
100<item>The Python quotes example now always parses the file from
101the original &url;.</item>
102<item>The Python quotes and the media example now print the result
103to <lit>stdout</lit>.</item>
104</ulist>
105</section>
106
107
108<section><title>Changes in 2.15.3 (released 07/16/2007)</title>
109<ulist>
110<item>Use a consistent license (MIT) everywhere. This should make
111&xist; Debian compatible.</item>
112<item>Change the Python quotes example, so that it works even if
113there's no <filename>python-quotes.xml</filename> in the current
114directory.</item>
115</ulist>
116</section>
117
118
119<section><title>Changes in 2.15.2 (released 01/24/2007)</title>
120<ulist>
121<item>Fixed a bug in <method>presenters.CodePresenter.__str__</method>.</item>
122<item>Fixed base URL handling for tidy parsing.</item>
123<item>Updated examples.</item>
124<item>Updated <function>xiter</function> and <function>xattrs</function>
125implementations for <class>Node</class> and <class>Namespace</class> to
126conform to the newest version of IPython.</item>
127</ulist>
128</section>
129
130
131<section><title>Changes in 2.15.1 (released 09/25/2006)</title>
132<ulist>
133<item>Fixed a few bugs in the <module>sgmlop</module> function declarations.</item>
134<item>Readded the spacer pixel.</item>
135</ulist>
136</section>
137
138
139<section><title>Changes in 2.15 (released 09/24/2006)</title>
140<ulist>
141<item>&xist; has been made compatible with Python 2.5: Code has been updated
142to use the proper C API for memory management and <link href="http://www.python.org/dev/peps/pep-0353/">PEP 353</link>
143support has been added. &xist; now includes its own fixed version of <module>sgmlop</module>.</item>
144<item>The <class>ll.xist.xsc.Attrs</class> methods <method>with</method> and
145<method>without</method> have been renamed to <method>withnames</method> and
146<method>withoutnames</method> for Python 2.5 compatibility.</item>
147<item><class>ll.xist.ns.htmlspecials.pixel</class> no longer handles colors
148via different GIFs. It uses the <lit>background-color</lit> in the <lit>style</lit>
149attribute instead. The same change has been implemented for
150<class>ll.xist.ns.htmlspecials.autopixel</class>. It's now possible to overwrite
151the default <lit>src</lit> attribute value of <lit>root:px/spc.gif</lit> either
152via the &xml; attribute or via the converter context.</item>
153<item>The node method <method>asText</method> has been made a function, moved
154into the <module>html</module> namespace and renamed to <function>astext</function>.
155Furthermore <app moreinfo="http://elinks.or.cz/">elinks</app> is used for plain text
156formatting now instead of <app moreinfo="http://w3m.sourceforge.net/">w3m</app>.</item>
157</ulist>
158</section>
159
160
161<section><title>Changes in 2.14.2 (released 07/04/2006)</title>
162<ulist>
163<item>Fixed a bug in the <method>presentAttr</method> method of
164<class>ll.xist.presenters.TreePresenter</class>.</item>
165</ulist>
166</section>
167
168
169<section><title>Changes in 2.14.1 (released 06/29/2006)</title>
170<ulist>
171<item>Fixed a bug in the <method>presentEntity</method> method of
172<class>ll.xist.presenters.CodePresenter</class>.</item>
173<item>Updated installation instructions.</item>
174</ulist>
175</section>
176
177
178<section><title>Changes in 2.14 (released 06/28/2006)</title>
179<ulist>
180<item>Namespaces for RSS 0.91, RSS 2.0 and Atom 1.0 have been added.</item>
181
182<item>A new namespace <module>ll.xist.ns.detox</module> has been added that
183is similar to <module>ll.toxic</module> but can be used to generate Python
184code instead of PL/SQL code. Using <module>detox</module> templates is about
18550 times faster than using &xist; trees directly and about 10 times faster than
186<link href="http://kid.lesscode.org/">Kid</link>.</item>
187
188<item>Presenters are now compatible to <link href="http://ipython.scipy.org/">IPython</link>'s
189ipipe module. This means that you can browse &xist; trees interactively
190if you have IPython installed. <class>NormalPresenter</class> and the
191<class>Node</class> methods <method>repr</method> and <method>asrepr</method>
192have been removed.</item>
193
194<item>A new processing instruction <class>ll.xist.ns.specials.url</class>
195has been added that does the same &url; transformation as
196<class>ll.xist.xsc.URLAttr</class> does.</item>
197
198<item>On publishing <class>ll.xist.ns.html.html</class> now only adds a
199<lit>lang</lit> and <lit>xml:lang</lit> attribute, if neither of them exists.</item>
200
201<item><module>setuptools</module> is now supported for installation.</item>
202</ulist>
203</section>
204
205
206<section><title>Changes in 2.13 (released 10/31/2005)</title>
207<ulist>
208<item><method>ll.xist.xsc.Namespace.tokenize</method> requires a
209<class>unicode</class> object as input now. This makes it possible
210to use encodings that are not ASCII compatible (such as UTF-16).
211The <arg>encoding</arg> argument is gone.</item>
212
213<item><method>ll.xist.xsc.Node.asString</method> uses the <arg>encoding</arg>
214argument to determine which characters have to be output as character references
215now. (You'll still get a unicode object as the result.)</item>
216
217<item>A new processing instruction class <class>ll.xist.ns.specials.literal</class>
218has been added, that will output its content literally when published. This
219can be used for embedding preformatted &xml; (e.g. from a database) into an
220XIST tree.</item>
221</ulist>
222
223</section>
224
225
226<section><title>Changes in 2.12 (released 10/13/2005)</title>
227<ulist>
228<item>Namespaces for <link href="http://www.relaxng.org/">Relax NG</link> and
229<link href="http://kid.lesscode.org/">Kid</link> have been added.</item>
230
231<item>&xist; requires version 1.0 of the core package now.</item>
232
233<item>The class name for the DocBook &dtd; class has been fixed.</item>
234
235</ulist>
236
237</section>
238
239
240<section><title>Changes in 2.11 (released 07/29/2005)</title>
241<ulist>
242<item>A script <filename>xml2xsc.py</filename> has been added, that
243can be used to parse an &xml; file and generate a rudimentary &xist; namespace
244from it.</item>
245
246<item>A <class>DocType</class> for XHTML 1.1 has been added
247(suggested by Elvelind Grandin).</item>
248
249<item>Line number information is now added when parsing &html;.</item>
250
251<item>The <method>sorted</method> method now supports the same arguments
252(<arg>cmp</arg>, <arg>key</arg> and <arg>reverse</arg>) as
253<method>list.sort</method> and <function>sorted</function> in Python 2.4.</item>
254
255<item>The <method>walk</method> doesn't yield the node directly, but yields
256a <class>Cursor</class> object now, with has several ways of referencing the node.</item>
257
258<item>New methods <method>walknode</method>, <method>walkpath</method> and
259<method>walkindex</method> have been added.</item>
260
261<item>Presenters use an iterator &api; instead of a stream &api; now. Dumping
262an &xml; tree presentation to the terminal can now start immediately instead
263of having to wait for the complete string to be formatted.</item>
264
265<item>Fixed a bug with element/attribute names that contained a <lit>.</lit>
266character. (This broke <module>ll.xist.ns.fo</module>.)</item>
267
268<item>Fixed a bug with <lit>xmlns</lit> attributes in nested elements.
269When an element ended the parser restored the wrong prefix mapping.</item>
270
271<item>The <dirname>python-quotes</dirname> demo has been updated to use the
272current version of AMK's &xml; file.</item>
273
274<item>Removed iterator stuff from <module>ll.xist.xfind</module>, as this
275is now part of the <module>ll</module> package/module.</item>
276
277<item>The function <function>ToNode</function> has been renamed to
278<function>tonode</function>.</item>
279
280<item><class>ll.xist.Context</class> no longer subclasses <class>list</class>.</item>
281
282<item><class>ll.xist.ns.doc.explain</class> will now try to output the objects
283in the order in which they appear in the Python source.</item>
284
285<item>The node methods <method>find</method> and <method>findfirst</method>
286have been removed.</item>
287
288<item><module>ll.xist.ns.cond</module> now uses a sandbox dictionary in a
289converter context for evaluating expression.</item>
290</ulist>
291</section>
292
293
294<section><title>Changes in 2.10 (released 05/20/2005)</title>
295<ulist>
296<item>The content of the processing instruction <class>ll.xist.ns.code.pyexec</class>
297will not be executed at construction time, but at conversion time. The code
298in <class>ll.xist.ns.code.pyexec</class> or <class>ll.xist.ns.code.pyeval</class>
299will no longer be executed in the <module>ll.xist.sandbox</module> module
300(which has been removed), but in a sandbox dictionary in the converter context
301of the <module>ll.xist.ns.code</module> namespace.</item>
302
303<item>The tests have been ported to <link href="http://codespeak.net/py/current/doc/test.html">py.test</link>.</item>
304
305<item>The method <method>mapped</method> is now callable without arguments.
306In this case a converter will be created on the fly. You can pass constructor
307arguments for this converter to <method>mapped</method> as keyword arguments.</item>
308
309<item>The publishing &api; has changed again: <method>ll.xist.publishers.Publisher.publish</method>
310no longer accepts an argument <arg>stream</arg> to which the byte strings are
311written, but it is a generator now. The publisher methods <method>write</method>
312and <method>writetext</method> have been renamed to <method>encode</method> and
313<method>encodetext</method> and return the encoded byte string, instead of
314writing it directly to the stream. There's a new generator method
315<method>bytes</method> for nodes now, which can be passed the same arguments
316as <method>asBytes</method>. These changes should help when using
317&xist; in &wsgi; applications.</item>
318
319<item>The iterator returned from <method>Element.__getitem__</method>,
320<method>Frag.__getitem__</method> and the <method>walk</method> method
321now supports <method>__getitem__</method> itself, so you can write
322<lit><rep>table</rep>[html.tr][0]</lit> to get the first row from a table or
323<lit><rep>page</rep>.walk(xsc.FindTypeAll(html.td))[-1]</lit> to get the last table cell
324from a complete &html; page.</item>
325
326<item>Several bugs in the namespaces <module>ll.xist.ns.meta</module>,
327<module>ll.xist.ns.form</module> and
328<module>ll.xist.ns.specials</module> have been fixed.</item>
329<item>The namespace modules <module>ll.xist.ns.css</module> and
330<module>ll.xist.ns.cssspecials</module> have been removed.</item>
331</ulist>
332</section>
333
334
335<section><title>Changes in 2.9 (released 04/21/2005)</title>
336<ulist>
337<item>&xist; trees can now be pickled. The only restriction is that global
338attributes must come from a namespace that has been turned into a module
339via <method>makemod</method>, so that this module can be imported on
340unpickling.</item>
341
342<item><par>Two arguments of the <method>walk</method> method have been renamed:
343<arg>filtermode</arg> has been renamed to <arg>inmode</arg> and <arg>walkmode</arg>
344has been renamed to <arg>outmode</arg>. For these modes two new values are
345supported:</par>
346<dlist>
347<term><lit>ll.xist.xsc.walkindex</lit></term><item>The value passed to the filter
348function or yielded from the iterator is a list containing child indizes and
349attribute names that specify the path to the node in question.</item>
350<term><lit>ll.xist.xsc.walkrootindex</lit></term><item>The filter function
351will be called with two arguments: The first is the root node of the tree (i.e.
352the node for which <method>walk</method> has been called), the second one is
353an index path (just like for <lit>ll.xist.xsc.walkindex</lit>). If used as
354an <arg>outmode</arg> a tuple with these two values will be yielded.</item>
355</dlist>
356</item>
357<item><par>Attribute mappings now support <method>__getitem__</method>,
358<method>__setitem__</method> and <method>__delitem__</method> with list
359arguments, i.e. you can do:</par>
360<prog>
361<prompt>&gt;&gt;&gt; </prompt><input>from ll.xist.ns import html</input>
362<prompt>&gt;&gt;&gt; </prompt><input>e = html.a("gurk", href=("hinz", "kunz"))</input>
363<prompt>&gt;&gt;&gt; </prompt><input>print e.attrs[["href", 0]]</input>
364hinz
365<prompt>&gt;&gt;&gt; </prompt><input>e.attrs[["href", 0]] = "hurz"</input>
366<prompt>&gt;&gt;&gt; </prompt><input>print e["href"]</input>
367hurzkunz
368<prompt>&gt;&gt;&gt; </prompt><input>del e.attrs[["href", 0]]</input>
369<prompt>&gt;&gt;&gt; </prompt><input>print e["href"]</input>
370kunz
371</prog>
372</item>
373<item><par>&xml; attributes can now be accessed as Python attributes, i.e.</par>
374<prog>
375<prompt>&gt;&gt;&gt; </prompt><input>from ll.xist.ns import html</input>
376<prompt>&gt;&gt;&gt; </prompt><input>e = html.a("spam", href="eggs")</input>
377<prompt>&gt;&gt;&gt; </prompt><input>print e.attrs.href</input>
378eggs
379</prog>
380<par>(Don't confuse this with <lit>e.Attrs.href</lit> which is the
381attribute class.)</par>
382</item>
383
384<item><class>Frag</class> and <class>Element</class> now support <class>Node</class>
385subclasses as arguments to their <method>__getitem__</method> method: An iterator
386for all children of the specified type will be returned.</item>
387
388<item>The encoding used for parsing now defaults to <lit>None</lit>. When
389reading from an &url; and no default encoding has been specified the one
390from the <lit>Content-Type</lit> header will be used. If this still doesn't
391result in a usable encoding, <lit>"utf-8"</lit> will be used when parsing &xml;
392and <lit>"iso-8859-1"</lit> will be used when parsing broken &html;.</item>
393
394<item>All error and warning classes from <module>ll.xist.errors</module>
395have been merged into <module>ll.xist.xsc</module>. This avoids import
396problems with circular imports.</item>
397
398<item>The attributes <lit>showLocation</lit> and <lit>showPath</lit>
399of <class>ll.xist.presenters.TreePresenter</class> have been lowercased and
400presenters are properly reset after they've done their job.</item>
401
402<item>The class attribute <lit>xmlname</lit> will no longer be turned into a list
403containing the Python and the &xml; name, but will be the &xml; name only. You
404can get the Python name from <lit><rep>foo</rep>.__class__.__name__</lit>.</item>
405
406<item><class>DeprecationWarning</class>s for <lit>name</lit> and
407<lit>attrHandlers</lit> have finally been removed.</item>
408
409<item>Instances of <class>ll.xist.xsc.Entity</class> subclasses can now be
410compared. <method>__eq__</method> simply checks if the objects are instances
411of the same class.</item>
412</ulist>
413</section>
414
415
416<section><title>Changes in 2.8.1 (released 03/22/2005)</title>
417<ulist>
418<item>Added a note about the package init file to the installation
419documentation.</item>
420</ulist>
421</section>
422
423
424<section><title>Changes in 2.8 (released 01/03/2005)</title>
425<ulist>
426<item>&xist; requires Python 2.4 now.</item>
427
428<item><class>ll.xist.ns.specials.x</class> has been renamed to
429<class>ll.xist.ns.specials.ignore</class>.</item>
430
431<item><class>ll.xist.utils.findAttr</class> has been renamed to
432<class>ll.xist.utils.findattr</class>.</item>
433
434<item><class>ll.xist.xfind.item</class> no longer handles slices.</item>
435
436<item>XFind has been enhanced to support item and slice operators, i.e.
437if <lit><rep>foo</rep></lit> is an XFind operator, <lit><rep>foo</rep>[0]</lit>
438is an operator that will produce the first node from <lit><rep>foo</rep></lit>
439(if there is one). Negative values and slices are supported too.</item>
440
441<item>Operators can be chained via division: <lit>html.a/html.b</lit> is an
442operator that can be passed around and applied to a node.</item>
443
444<item>&xist; requires the new core module and makes use of the new
445<z>cooperative displayhook</z> functionality defined there: If you install
446the displayhook you can tweak or replace <lit>ll.xist.presenters.hookpresenter</lit>
447to change the output.</item>
448</ulist>
449</section>
450
451
452<section><title>Changes in 2.7 (released 11/24/2004)</title>
453<ulist>
454<item>The transparent pixel used by <class>ll.xist.ns.htmlspecials.pixel</class>
455has been renamed to <filename>spc.gif</filename> to avoid problems with IE.</item>
456<item>Removed a debug print in <class>ll.xist.xfind.Finder.__getitem__</class>.</item>
457<item><module>ll.xist.xfind</module> now has a new function <function>item</function>,
458that can be used to get a certain item or slice from an iterator.
459<function>xfind.first</function> and <function>xfind.last</function> have been
460changed to use <function>xfind.item</function>, so you now have to pass a
461default value to get the old behaviour.</item>
462<item>Obsolete options in <module>ll.xist.options</module> have been removed
463(and <lit>reprEncoding</lit> has been renamed to <lit>reprencoding</lit>).</item>
464</ulist>
465</section>
466
467
468<section><title>Changes in 2.6.2 (released 06/06/2005)</title>
469<ulist>
470<item>Fixed a bug in <method>ll.xist.parsers.Parser.parse</method>.</item>
471</ulist>
472</section>
473
474
475<section><title>Changes in 2.6.1 (released 11/02/2004)</title>
476<ulist>
477<item>Fixed a bug in <method>ll.xist.xfind.Finder.__floordiv__</method>.</item>
478<item>Restricted characters as defined in
479<link href="http://www.w3.org/TR/2004/REC-xml11-20040204/#NT-RestrictedChar">&xml; 1.1</link>
480will now be published as character references.</item>
481</ulist>
482</section>
483
484
485<section><title>Changes in 2.6 (released 10/26/2004)</title>
486<ulist>
487<item><function>ToNode</function> now tries iterating through the
488value passed in, so it's now possible to pass iterators and generators
489(and generator expressions in Python 2.4) to <class>Frag</class>
490and <class>Element</class> constructors.</item>
491
492<item><par>A new &api; named XFind has been added for iterating through &xml;
493trees. XFind expressions look somewhat like XPath expressions but are pure
494Python expressions. For example finding all images inside links in an &html;
495page can be done like this:</par>
496<example><title>Finding linked images with XFind</title>
497<prog>
498from ll.xist import parsers, xfind
499from ll.xist.ns import html
500node = parsers.parseURL("http://www.python.org/", tidy=True)
501for img in node//html.a/html.img:
502    print img["src"]
503</prog>
504</example>
505
506<par>The module <module>ll.xist.xfind</module> contains several operators
507that can be used in XFind expressions.</par>
508</item>
509
510<item>Parsing broken &html; is now done with the &html; parser from
511<link href="http://www.xmlsoft.org/">libxml2</link>. The parsing functions
512no longer accept options for tidy, only the boolean value of the <arg>tidy</arg>
513argument is used.</item>
514
515<item>The publishing &api; has been simplified: Publication can now be done with
516a call to <method>ll.xist.publishers.Publisher.publish</method>, passing in a
517<class>ll.xist.xsc.Node</class>. Writing strings to the publisher output is
518now done with <method>ll.xist.publishers.Publisher.write</method>. The methods
519<method>beginPublication</method> and <method>endPublication</method> have been
520removed.</item>
521
522<item>The presentation &api; has been simplified in the same way: You'll get a
523presentation by calling: <lit>string = <rep>presenter</rep>.present(<rep>node</rep>)</lit>.
524The methods <method>beginPresentation</method> and <method>endPresentation</method>
525have been removed.</item>
526
527<item>The parser now has the option to ignore illegal elements, attributes,
528processing instructions and entities. The default behaviour is to raise an
529exception, but this can now be reconfigured via Python's warning framework.</item>
530
531<item>The classmethod <method>tokenize</method> from <module>ll.toxic</module>
532has been moved to <class>ll.xist.xsc.Namespace</class>, so it's now possible
533to tokenize an &xml; string for other processing instructions as well.</item>
534
535<item>A new class <class>ll.xist.xsc.NSPool</class> has been added.
536An <class>NSPool</class> contains a pool of namespaces from which the parser
537selects the appropriate namespace once an <lit>xmlns</lit> attribute is
538encountered.</item>
539
540<item>The script <filename>xscmake.py</filename> (which has been unmaintained
541for a while now) has been removed.</item>
542
543<item>Elements <class>hostname</class>, <class>tty</class>, <class>prompt</class>
544and <class>input</class> were add to <module>ll.xist.ns.doc</module>.</item>
545
546<item>The method <method>ll.xist.xsc.Attrs.set</method> now returns the
547new attribute object.</item>
548
549<item>The <method>visit</method> method has been removed.</item>
550
551<item><method>ll.xist.xsc.FindOld</method> has been removed.</item>
552
553<item><class>ll.xist.ns.xml.header</class> has been renamed to
554<class>ll.xist.ns.xml.declaration</class>.</item>
555
556</ulist>
557
558</section>
559
560
561<section><title>Changes in 2.5 (released 06/30/2004)</title>
562<ulist>
563
564<item>Specifying content models for elements has seen major enhancements. The
565boolean class attribute <lit>empty</lit> has been replaced by an object
566<lit>model</lit> whose <method>checkvalid</method> method will be called
567for validating the element content.</item>
568
569<item>A new module <module>ll.xist.sims</module> has been added that provides
570a simple schema validation. Schema violations will be reported via Pythons
571warning framework.</item>
572
573<item>All namespace modules have been updated to use <module>sims</module>
574information. The &svg; module has been updated to &svg; 1.1. The docbook
575module has been updated to DocBook 4.3.</item>
576
577<item>It's possible to switch off validation during parsing and publishing.</item>
578
579<item><par><class>ll.xist.xsc.Frag</class> and <class>ll.xist.xsc.Element</class>
580both have a <method>__call__</method> method with the same arguments as
581their constructors. Those methods will append content nodes (and set attributes
582for <class>ll.xist.xsc.Element</class>) and return <self/>, so they can be used
583when creating an object tree. This makes it possible to put the attributes close
584to the tag name, instead of putting them at the end after the content.</par>
585<par>Instead of:</par>
586<example>
587<prog>
588node = html.table(
589    html.tr(
590        html.td("foo"),
591        html.td("bar"),
592    ),
593    html.tr(
594        html.td("spam"),
595        html.td("eggs")
596    ),
597    class_="example"
598)
599</prog>
600</example>
601<par>you can now use the following:</par>
602<example>
603<prog>
604node = html.table(class_="example")(
605    html.tr(
606        html.td("foo"),
607        html.td("bar"),
608    ),
609    html.tr(
610        html.td("spam"),
611        html.td("eggs")
612    )
613)
614</prog>
615</example>
616
617</item>
618
619<item><par>Experimental support for Holger Krekel's
620<link href="http://codespeak.net/svn/user/hpk/talks/xpython-talk.txt">XPython</link>
621has been added. Code might look like this:</par>
622<example>
623<prog>
624from ll.xist import xsc, converters
625from ll.xist.ns import html, meta
626
627import random
628
629c = converters.Converter()
630&lt;c&gt;:
631    &lt;html.html()&gt;:
632        &lt;html.head()&gt;:
633            &lt;meta.contenttype()&gt;: pass
634            &lt;html.title()&gt;:
635                xsc.append("The title")
636        &lt;html.body(class_="foo")&gt;:
637            &lt;html.h1()&gt;:
638                flag = random.choice((0, 1))
639                if flag:
640                    xsc.append("The foo page", class_="foo")
641                else:
642                    xsc.append("The bar page", class_="bar")
643            &lt;html.p()&gt;:
644                if flag:
645                    xsc.append("The foo content")
646                else:
647                    xsc.append("The bar content")
648
649print c.lastnode.asBytes()
650</prog>
651</example>
652</item>
653
654<item>
655<par>Creating global attributes has been simplified. Passing an instance
656of <class>ll.xist.xsc.Namespace.Attrs</class> to an <class>Element</class>
657constructor now does the right thing:</par>
658<example>
659<prog>
660from ll.xist.ns import html, xml
661node = html.html(
662    html.head(),
663    xml.Attrs(lang="de"),
664    lang="en",
665)
666</prog>
667</example>
668</item>
669
670<item>Creating skeleton implementations of &xist; namespaces is no longer done
671via &xml; conversion (i.e. the namespace module <module>ll.xist.ns.xndl</module>),
672but through the new module <module>ll.xist.xnd</module>. The script
673<filename>dtdxsc.py</filename> will automatically generate <module>sims</module>
674information.</item>
675
676<item><class>ll.xist.xsc.CharRef</class> now inherits from
677<class>ll.xist.xsc.Text</class> too, so you don't have to special case
678<class>CharRef</class>s any more. When publishing, <class>CharRef</class>s
679will be handled like <class>Text</class> nodes.</item>
680
681<item><class>ll.xist.ns.meta.contenttype</class> now has an attribute
682<lit>mimetype</lit> (defaulting to <lit>"text/html"</lit>) for specifying
683the &mime; type.</item>
684
685<item><class>ll.xist.ns.htmlspecials.caps</class> has been removed.</item>
686
687<item>Registering elements in namespace classes has been rewritten to use
688a cache now.</item>
689
690<item>Pretty printing has been changed: Whitespace will only be added now if
691there are no text nodes in element content.</item>
692
693<item>Two mailing lists are now available: One for discussion about &xist;
694and one for &xist; announcements.</item>
695</ulist>
696</section>
697
698
699<section><title>Changes in 2.4.1 (released 01/05/2004)</title>
700<ulist>
701<item>Changed the xmlname of <class>ll.xist.ns.jsp.directive_page</class> back again
702(it's <lit>directive.page</lit> only for the &xml; form, which we don't use anyway.)</item>
703
704<item>Drop the default value for <class>ll.xist.ns.jsp.directive_page.Attrs.language</class>,
705as this attribute can only be used once.</item>
706
707<item>If an <class>ll.xist.xsc.Prefixes</class> object has a prefix mapping for
708a namespace it will return this prefix too, if asked for a prefix for a subclass
709of this namespace.</item>
710</ulist>
711</section>
712
713
714<section><title>Changes in 2.4 (released 01/02/2004)</title>
715<ulist>
716<item>The class <class>ll.xist.parsers.Handler</class> has been renamed to
717<class>Parser</class> and has been made reusable, i.e. it is possible to
718instantiate a parser once and use it multiple times for parsing. All the
719classes derived from <class>xml.sax.xmlreader.InputSource</class> have been
720dropped and the methods for parsing strings, &url;s and files have been
721implemented as methods of the parser. Most of the arguments that had to be passed
722to the various parsing functions are passed to the parser constructor now.
723The basic parsing functionality is implemented by parsing streams instead of
724<class>InputSource</class>s.</item>
725<item>Similar to the changes for parsing, publishers have been changed to be
726reusable and most arguments to the publishing functions are available as
727arguments to the publisher constructor.</item>
728<item>Now converter contexts are no longer bound to an element
729class, but to the context class defined by the element class, i.e.
730the attribute <lit>Context</lit> of the argument for <method>Converter.__getitem__</method>
731will be used as the dictionary key. This makes it possible to use a class
732and it subclasses interchangeably (as long as the base class defines
733its own <class>Context</class> class and the subclasses don't overwrite it).</item>
734<item>Added a find functor <class>FindTypeAllAttrs</class> that
735searches content and attributes.</item>
736<item>Fixed the &xml; name for <class>ll.xist.ns.jsp.directive_page</class>.</item>
737<item>All character references in <module>ll.xist.ns.ihtml</module>
738that exist in <module>ll.xist.ns.chars</module> too have been removed.</item>
739</ulist>
740</section>
741
742
743<section><title>Changes in 2.3 (released 12/08/2003)</title>
744<ulist>
745<item>It's now possible to parse &xml; without generating location
746information for each node, by passing <lit>loc=False</lit> to
747the constructor of the <class>Handler</class>.</item>
748<item>The <class>HTMLParser</class> no longer complains about
749global attributes or <lit>xmlns</lit>.</item>
750<item>&xist; now supports <app moreinfo="http://utidylib.sf.net/">&micro;Tidylib</app>
751in addition to <app>mxTidy</app>. If <app>&micro;Tidylib</app> is found
752it is preferred over <app>mxTidy</app>.</item>
753<item>It's possible now to pass arguments to tidy simple by
754passing an argument dictionary for the <arg>tidy</arg> argument
755in the parsing functions.</item>
756<item>The methods <method>parsed</method> and <method>checkvalid</method>
757have been separated.</item>
758<item><class>ll.xist.ns.htmlspecials.pixel</class> and
759<class>ll.xist.ns.htmlspecials.autopixel</class> now check whether their
760<lit>color</lit> attribute is ok.</item>
761<item>The base &url; is now set correctly when parsing from an &url;
762even if the original &url; does a redirect. (This requires <module>ll.url</module>
763version 0.11.3).</item>
764<item>Namespace handling has been rewritten again, to be more standards
765compliant: Now there is no prefixes for entities and processing instructions any longer.
766Prefix mappings can be created much simpler, and they no longer contain any
767namespace stack for parsing, as this is now done by the parser itself.
768<class>xsc.NamespaceAttrMixIn</class> is gone too.</item>
769<item>The processing instructions <class>exec_</class> and <class>eval_</class>
770from <module>ll.xist.ns.code</module> have been renamed to <class>pyexec</class>
771and <class>pyeval</class> and <class>import_</class> has been removed.</item>
772<item><class>CharRef</class>s from <module>ll.xist.ns.html</module> have been
773moved to a new module named <module>ll.xist.ns.chars</module>.</item>
774<item>The method names <method>beginPublication</method>, <method>endPublication</method>
775and <method>doPublication</method> have been lowercased.</item>
776</ulist>
777</section>
778
779
780<section><title>Changes in 2.2 (released 07/31/2003)</title>
781<ulist>
782<item><par>Namespace handling has been completely rewritten.
783Namespaces are now classes derived from <class>ll.xist.xsc.Namespace</class>.
784Defining element classes can be done inside or outside the namespace
785class. If the element classes are defined outside the namespace
786class, they can be moved inside the namespace with a simple
787attribute assignment:</par>
788<prog>
789class foo(xsc.Element):
790    empty = False
791
792class xmlns(xsc.Namespace):
793    xmlname = "foo"
794    xmlurl = "http://www.foo.com/ns/foo"
795
796xmlns.foo = foo
797</prog>
798<par>The methods <method>elementkeys</method>, <method>iterelementkeys</method>,
799<method>elementvalues</method>, <method>iterelementvalues</method>,
800<method>elementitems</method> and <method>iterelementitems</method>
801can be used for iterating through the element classes and their
802names. You can use the method <method>element</method>
803to get an element class with a certain name:</par>
804<prog>
805&gt;&gt;&gt; from ll.xist.ns import html
806&gt;&gt;&gt; html.element("div")
807&lt;element class ll.xist.ns.html/div at 0x824363c&gt;
808</prog>
809<par>For processing instructions, entities and character references
810similar methods are available.</par>
811<par>The method <method>update</method> can be used to add
812many element classes to a namespace at once, simply by passing
813a dictionary with those classes (use <lit>vars()</lit>
814to add everything that's defined inside your module). The method
815<method>updatenew</method> does the same, but copies only those
816attributes that don't exist in the namespace, <method>updateexisting</method>
817copies only those that do exist. You can turn a namespace
818into a module with <method>makemod</method>:</par>
819<prog>
820from ll.xist import xsc
821
822class foo(xsc.Element):
823    empty = False
824
825class xmlns(xsc.Namespace):
826    xmlname = "foo"
827    xmlurl = "http://www.foo.com/ns/foo"
828xmlns.makemod(vars())
829</prog>
830<par>Put the above code into <filename>foo.py</filename> and
831you can do the following:</par>
832<prog>
833>>> import foo
834>>> foo
835&lt;namespace foo/xmlns name=u'foo' url=u'http://www.foo.com/ns/foo' with 1 elements from 'foo.py' at 0x81bfc14&gt;
836</prog>
837</item>
838
839<item><function>getns</function> has been dropped, so you always
840have to pass in a <class>Namespace</class> class where a namespace
841is required.</item>
842
843<item>For the <class>ll.xist.ns.jsp.directive_page</class> element
844automatic generation of the correct <lit>charset</lit> option
845in the <lit>contentType</lit> attribute is only done when there
846is a <lit>contentType</lit> attribute, as <lit>contentType</lit>
847is optional.</item>
848
849<item>The converter has a new property <function>node</function>.
850<arg>node</arg> can't be passed to <method>conv</method> but
851will be set to <self/> by <method>conv</method> automatically.
852This makes it possible to access the <z>document root</z>
853during conversion.</item>
854
855<item><class>ll.xist.ns.htmlspecials.autoimg</class> no longer touches
856existing width and height attributes. This means that %-formatting
857of the existing attributes is no longer done.</item>
858
859<item>Added a new class <class>ll.xist.ns.htmlspecials.autopixel</class>
860that works like <class>ll.xist.ns.htmlspecials.pixel</class> but
861inherits the size for the image specified via the <lit>src</lit>
862attribute.</item>
863
864<item><class>Frag</class> and <class>Element</class> now support
865extended slices.</item>
866
867<item><class>Frag</class> and <class>Element</class> now support
868the methods <method>extend</method> and <method>__iadd__</method>.</item>
869
870<item>For walking the tree the method <method>walk</method> has been completely
871rewritten and a new method <method>visit</method> has been added. For
872more info see the docstrings.</item>
873
874<item><class>Node</class> now has two new methods <method>copy</method>
875and <method>deepcopy</method> and supports the <module>copy</module>
876module from the Python standard library.</item>
877
878<item>Calling <method>mapped</method> through <method>conv</method> has
879been removed. You again have to call <method>mapped</method> directly
880and pass a node and a converter.</item>
881
882<item>The &html; handling of the <class>HTMLParser</class> has been improved
883(it now uses code from <module>xml.sax.drivers2.drv_sgmlop_html</module> (which
884is part of <link href="http://pyxml.sf.net">PyXML</link>)).</item>
885
886<item>The core functionality found in the script <filename>dtd2xsc.py</filename>
887has been moved to a class method <method>ll.xist.ns.xndl.fromdtd</method> in the
888<module>ll.xist.ns.xndl</module> namespace.</item>
889
890<item><class>ll.xist.parsers.ExpatParser</class> is now a real subclass
891instead of an alias for <class>xml.sax.expatreader.ExpatParser</class>
892It reports unknown entity references to the application (if loading
893of external entities is switched off, which is done by
894<class>ll.xist.parsers.Handler</class> and only outside of attributes).</item>
895
896<item>Namespaces have been added for Zope's TAL and METAL specifications.</item>
897
898<item>A namespace has been added for <link href="http://www.w3.org/Style/XSL/">XSL-FO</link>.</item>
899</ulist>
900</section>
901
902
903<section><title>Changes in 2.1.4 (released 06/13/2003)</title>
904<ulist>
905<item>Remove the checks for attributes in attributes and
906moved the publication code for the full element into a separate
907method. This allows &jsp; tag library namespaces to simply
908overwrite <method>publish</method> to publish the element
909even inside attributes. (This is the same fix as in release 1.5.10)</item>
910</ulist>
911</section>
912
913
914<section><title>Changes in 2.1.3 (released 05/07/2003)</title>
915<ulist>
916<item>The methods <method>sorted</method>, <method>reversed</method>
917and <method>shuffled</method> have been rewritten so they no longer
918use <lit>sys.maxint</lit>. This change fixes those methods for
91964 bit platforms (reported by Giles Frances Hall)</item>
920</ulist>
921</section>
922
923
924<section><title>Changes in 2.1.2 (released 02/27/2003)</title>
925<ulist>
926<item><class>ll.xist.ns.struts_config11.plug_in</class> now
927allows content (as the &dtd; states). (This is the same fix
928as in release 1.5.8.)</item>
929</ulist>
930</section>
931
932
933<section><title>Changes in 2.1.1 (released 02/11/2003)</title>
934<ulist>
935<item>Added a few elements and attributes to <module>ll.xist.ns.doc</module>:
936<class>username</class>, which is used for the name of a user account,
937<class>xref</class>, which is used for internal cross references and
938the attribute <lit>id</lit> for <class>section</class>, which specifies
939the target for an <class>xref</class>.</item>
940</ulist>
941</section>
942
943
944<section><title>Changes in 2.1 (released 12/09/2002)</title>
945<ulist>
946<item>Added a new namespace module <module>ll.xist.ns.xndl</module>
947that contains the <z>&xist; namespace definition language</z>, i.e.
948elements that describe an &xist; namespace and can be used by
949various scripts to generate skeleton namespace modules.
950The first of these script is the &dtd; to namespace converter
951<filename>dtd2xsc.py</filename>.</item>
952<item>Added a new namespace module <module>ll.xist.ns.tld</module>
953that contains the definition for Java Server Pages Tag Library
954descriptors and a script <filename>tld2xsc.py</filename>
955that uses this namespace to generate namespace modules from
956<lit>tld</lit> files.</item>
957<item><class>Attr</class> now supports the method
958<method>filtered</method>. This is used by <method>without</method>
959now. The arguments for <method>without</method> have changed,
960because handling global attributes was too <z>magic</z>.
961A new method <method>with</method> has been added, with does
962the opposite of <method>without</method>, i.e. it removes all
963attributes that are not specified as parameters.</item>
964<item>The Python name of each <class>Node</class> subclass
965is now available as the class attribute <lit>pyname</lit>.</item>
966<item>To continue the great renaming <method>withSep</method>
967has been renamed to <method>withsep</method>.</item>
968<item>The namespace name for the <module>ll.xist.ns.struts_html</module>
969module has been fixed.</item>
970<item>The argument <arg>defaultEncoding</arg> for the various
971parsing functions has been renamed to <arg>encoding</arg>.</item>
972</ulist>
973</section>
974
975
976<section><title>Changes in 2.0.8 (released 11/20/2002)</title>
977<ulist>
978<item><function>ll.xist.ns.doc.getDoc</function> has been renamed
979to <function>getdoc</function>.</item>
980<item>The &css; parser was dropping the <lit>%</lit> from
981percentage values. This has been fixed.</item>
982</ulist>
983</section>
984
985
986<section><title>Changes in 2.0.7 (released 11/12/2002)</title>
987<ulist>
988<item><method>xsc.Element.__nonzero__</method> can no longer fall back
989to <method>xsc.Frag.__nonzero__</method>.
990(this is the same fix as in 1.5.7).</item>
991</ulist>
992</section>
993
994
995<section><title>Changes in 2.0.6 (released 11/11/2002)</title>
996<ulist>
997<item>Performance optimizations.</item>
998</ulist>
999</section>
1000
1001
1002<section><title>Changes in 2.0.5 (released 11/11/2002)</title>
1003<ulist>
1004<item>Fixed a bug in <class>ll.xist.ns.specials.autoimg</class>:
1005Attributes were not converted before the size check was done
1006(this is the same fix as in 1.5.5).</item>
1007</ulist>
1008</section>
1009
1010
1011<section><title>Changes in 2.0.4 (released 11/08/2002)</title>
1012<ulist>
1013<item>Fixed a regression bug in <class>ll.xist.ns.jsp.directive</class>
1014and several documentation issues.</item>
1015</ulist>
1016</section>
1017
1018
1019<section><title>Changes in 2.0.3 (released 10/30/2002)</title>
1020<ulist>
1021<item>Fixed a few bugs in <class>HTMLParser</class>.</item>
1022<item>Added DocBook conversion for several elements
1023in <module>ll.xist.ns.doc</module>.</item>
1024<item>Now the <filename>__init__.py</filename> file for the
1025<module>ll</module> package is included.</item>
1026</ulist>
1027</section>
1028
1029
1030<section><title>Changes in 2.0.2 (released 10/21/2002)</title>
1031<ulist>
1032<item>Fixed a bug in <method>Frag.__rmul__</method> (by
1033reusing <method>__mul__</method>).</item>
1034<item>Fixed a bug with the backwards compatible prefix
1035mapping: Defining element classes in <lit>exec</lit> processing
1036instructions didn't work, because the prefixes object used for
1037parsing wouldn't be updated when the namespace object is
1038defined inside the processing instruction. Now using the default
1039for the <arg>prefixes</arg> argument in calls to the parsing
1040functions uses one global shared <class>Prefixes</class> instances
1041where all the namespaces that are newly defined will be registered too.</item>
1042</ulist>
1043</section>
1044
1045
1046<section><title>Changes in 2.0.1 (released 10/17/2002)</title>
1047<ulist>
1048<item>Fixed <filename>xscmake.py</filename> by removing the
1049prefix handling. <class>OldPrefixes</class> will always
1050be used for parsing now.</item>
1051</ulist>
1052</section>
1053
1054
1055<section><title>Changes in 2.0 (released 10/16/2002)</title>
1056<ulist>
1057<item>&xist; now requires at least Python 2.2.1.</item>
1058<item>Attribute handling has been largely rewritten. Instead of
1059a class attribute <lit>attrHandlers</lit>, the attributes
1060are now defined through a nested class named <class>Attrs</class>
1061inside the element. This class must be derived from <class>ll.xist.Element.Attrs</class>
1062(or one of its subclasses if you want to inherit attributes from
1063this class). Defining attributes is done through classes nested
1064inside this attributes class and derived from any of the known
1065attribute classes (like <class>TextAttr</class>, <class>URLAttr</class> etc.).
1066The class name will be the attribute name (and can be overwritten
1067with a class attribute <lit>xmlname</lit>. This makes it possible
1068to have docstrings for attributes. Furthermore it's possible
1069to define an attribute default value via the class attribute <lit>default</lit>,
1070allowed values for the attribute via <lit>values</lit>,
1071which is a list of allowed values, and whether the attribute is
1072required or not via <lit>required</lit>.</item>
1073<item>&xist; now has real namespace support. The new class
1074<class>ll.xist.xsc.Prefixes</class> can be used to define a
1075mapping between prefixes and namespace names. This can be
1076used for parsing and publishing. Namespace support is even
1077available for entities and processing instruction.</item>
1078<item>Global attributes are supported now. Namespace modules
1079for the <lit>xml</lit> and <lit>xlink</lit> namespaces
1080have been added (and <class>ll.xist.xsc.XML</class> was
1081moved to <module>ll.xist.ns.xml</module>).</item>
1082<item>A new namespace module for &svg; 1.0 has been added: <module>ll.xist.ns.svg</module>.</item>
1083<item>The &html; specific parts of <module>ll.xist.ns.specials</module>
1084have been split off into a separate module <module>ll.xist.ns.htmlspecials</module>.</item>
1085<item>Comparison of attributes with strings has been removed.
1086You have to use <method>__unicode__</method> or <method>__str__</method>
1087now before comparing.</item>
1088<item>The <class>HTMLParser</class> now removes unknown attributes
1089instead of complaining.</item>
1090<item>There is a new parser class <class>BadEntityParser</class>, which
1091is a &sax;2 parser that recognizes the character entities
1092defined in &html; and tries to pass on unknown or malformed
1093entities to the handler literally.</item>
1094<item>To give all nodes a chance to do something after they have been parsed
1095(e.g. to prepend the base &url; for <class>URLAttr</class> nodes), the parser
1096now calls the method <method>parsed</method> immediately after node creation.
1097This is used for the new class <class>StyleAttr</class>, which uses the
1098<class>CSSTokenizer</class>, to prepend the base &url; to all &url;s
1099found in a style attribute.</item>
1100<item>The pixel images have been moved to the directory <dirname>px</dirname>
1101to make image &url;s shorter.</item>
1102</ulist>
1103</section>
1104
1105
1106<section><title>Changes in 1.6.1 (released 08/25/2003)</title>
1107<ulist>
1108<item>Updated to work with newer versions of <module>ll.ansistyle</module>.</item>
1109<item>Updated the namespaces <module>ll.xist.ns.struts_html</module> and
1110<module>ll.xist.ns.struts_config11</module> to the state of Struts 1.1 final.</item>
1111</ulist>
1112</section>
1113
1114
1115<section><title>Changes in 1.6 (released 07/02/2003)</title>
1116<ulist>
1117<item>Removed the default value for the <lit>className</lit> attribute
1118in <class>ll.xist.ns.struts_config11.action</class>.</item>
1119<item>Added an attribute <lit>type</lit> to
1120<class>ll.xist.ns.struts_config11.action_mapping</class>.</item>
1121</ulist>
1122</section>
1123
1124
1125<section><title>Changes in 1.5.13 (released 07/01/2003)</title>
1126<ulist>
1127<item>Implemented <method>ll.xist.xsc.Namespace.__eq__</method>,
1128so that replacing a namespace in the registry really works.</item>
1129<item>Added an attribute <lit>target</lit> to <class>ll.xist.ns.html.area</class>.</item>
1130</ulist>
1131</section>
1132
1133
1134<section><title>Changes in 1.5.12 (released 06/17/2003)</title>
1135<ulist>
1136<item>Fixed a bug in the new <module>ll.xist.ns.jsp</module>.</item>
1137</ulist>
1138</section>
1139
1140
1141<section><title>Changes in 1.5.11 (released 06/13/2003)</title>
1142<ulist>
1143<item>Updated <module>ll.xist.ns.jsp</module> to &jsp; 1.2.</item>
1144</ulist>
1145</section>
1146
1147
1148<section><title>Changes in 1.5.10 (released 06/13/2003)</title>
1149<ulist>
1150<item>Remove the checks for attributes in attributes and
1151moved the publication code for the full element into a separate
1152method. This allows &jsp; tag library namespaces to simply
1153overwrite <method>publish</method> to publish the element
1154even inside attributes.</item>
1155</ulist>
1156</section>
1157
1158
1159<section><title>Changes in 1.5.9 (released 04/30/2003)</title>
1160<ulist>
1161<item>Reregistering a namespace now properly overwrites
1162the old version in <lit>xsc.namespaceRegistry</lit>.</item>
1163</ulist>
1164</section>
1165
1166
1167<section><title>Changes in 1.5.8 (released 02/27/2003)</title>
1168<ulist>
1169<item><class>ll.xist.ns.struts_config11.plug_in</class> now
1170allows content (as the &dtd; states).</item>
1171</ulist>
1172</section>
1173
1174
1175<section><title>Changes in 1.5.7 (released 11/12/2002)</title>
1176<ulist>
1177<item><method>xsc.Element.__nonzero__</method> can no longer fall back
1178to <method>xsc.Frag.__nonzero__</method>.</item>
1179</ulist>
1180</section>
1181
1182
1183<section><title>Changes in 1.5.6 (released 11/11/2002)</title>
1184<ulist>
1185<item>Performance optimizations.</item>
1186</ulist>
1187</section>
1188
1189
1190<section><title>Changes in 1.5.5 (released 11/11/2002)</title>
1191<ulist>
1192<item>Fixed a bug in <class>ll.xist.ns.specials.autoimg</class>:
1193Attributes were not converted before the size check was done.</item>
1194</ulist>
1195</section>
1196
1197
1198<section><title>Changes in 1.5.4 (released 09/30/2002)</title>
1199<ulist>
1200<item><filename>xscmake.py</filename> now tries to strip off
1201a trailing <lit>xsc</lit> from the filename before it falls back
1202to the extension <lit>html</lit> (The builtin extension mapping
1203is still tried first).</item>
1204</ulist>
1205</section>
1206
1207
1208<section><title>Changes in 1.5.3 (released 09/25/2002)</title>
1209<ulist>
1210<item>Added new processing instruction class <class>ll.xist.ns.php.expression</class>
1211that generates a &php; <lit>print</lit> statement from its content.</item>
1212</ulist>
1213</section>
1214
1215
1216<section><title>Changes in 1.5.2 (released 09/19/2002)</title>
1217<ulist>
1218<item>Removed the <lit>value</lit> magic from
1219<class>ll.xist.ns.form.checkbox</class> as this
1220conflicted with dynamic <lit>value</lit> values.</item>
1221</ulist>
1222</section>
1223
1224
1225<section><title>Changes in 1.5.1 (released 09/17/2002)</title>
1226<ulist>
1227<item>Comparison of attributes with strings has been removed.
1228You have to use <method>__unicode__</method> or <method>__str__</method>
1229instead.</item>
1230<item>The <class>HTMLParser</class> now removes unknown attributes
1231instead of complaining.</item>
1232<item>There is a new parser class <class>BadEntityParser</class>, which
1233is a &sax;2 parser that recognizes the character entities
1234defined in &html; and tries to pass on unknown or malformed
1235entities to the handler literally.</item>
1236<item>To give all nodes a chance to do something after they have been parsed
1237(e.g. to prepend the base URL for <class>URLAttr</class> nodes), the parser
1238now calls the method <method>parsed()</method> immediately after node creation.
1239This is used for the new class <class>StyleAttr</class>, which uses the
1240<class>CSSTokenizer</class>, to prepend the base url to all urls found in
1241a style attribute.</item>
1242<item>The <class>HTMLParser</class> now removes unknown attributes
1243instead of complaining.</item>
1244<item>There is a new parser class <class>BadEntityParser</class>, which
1245is a &sax;2 parser that recognizes the character entities
1246defined in &html; and tries to pass on unknown or malformed
1247entities to the handler literally.</item>
1248<item>To give all nodes a chance to do something after they have been parsed
1249(e.g. to prepend the base &url; for <class>URLAttr</class> nodes), the parser
1250now calls the method <method>parsed</method> immediately after node creation.
1251This is used for the new class <class>StyleAttr</class>, which uses the
1252<class>CSSTokenizer</class>, to prepend to base &url; to all &url;s
1253found in a style attribute.</item>
1254</ulist>
1255</section>
1256
1257
1258<section><title>Changes in 1.4.3 (released 04/29/2002)</title>
1259<ulist>
1260<item>New namespace module <module>xist.ns.struts_config11</module>
1261allows to parse and modify <link href="http://jakarta.apache.org/struts/">Struts</link>
1262configuration files conforming to the
1263<link href="http://jakarta.apache.org/struts/dtds/struts-config_1_1.dtd">Struts 1.1 DTD</link>.
1264</item>
1265</ulist>
1266</section>
1267
1268
1269<section><title>Changes in 1.4.2 (released 03/22/2002)</title>
1270<ulist>
1271<item>Updated <filename>xscmake.py</filename> to be compatible with the new
1272<module>url</module> module.</item>
1273<item><class>xist.ns.jsp.directive_page</class> now automatically sets the
1274<lit>contentType</lit> on publishing.</item>
1275</ulist>
1276</section>
1277
1278
1279<section><title>Changes in 1.4.1 (released 03/21/2002)</title>
1280<ulist>
1281<item>Removed <class>TidyURLInputSource</class>. Now it's possible
1282to pass a <lit>tidy</lit> flag to the remaining functions <function>parseString</function>,
1283<function>parseFile</function> and <function>parseURL</function> to specify whether
1284the source should be tidied.</item>
1285<item>To prevent an element from being registered in a <class>Namespace</class>
1286the class attribute <lit>register</lit> can be used now. This makes
1287it possible to have a name for the element even when it's not registered.</item>
1288<item><module>xist.ns.form</module> elements now have all the attributes that the
1289corresponding elements from <module>xist.ns.html</module> have.</item>
1290<item>Removed the old <module>xist.url</module> from the Windows distribution.</item>
1291</ulist>
1292</section>
1293
1294
1295<section><title>Changes in 1.4 (released 03/18/2002)</title>
1296<ulist>
1297<item>Reimplemented &url; handling again. Now the new global
1298module <module>url</module> is used for that.</item>
1299</ulist>
1300</section>
1301
1302
1303<section><title>Changes in 1.3.1 (released 03/14/2002)</title>
1304<ulist>
1305<item>Added a method <method>pretty</method> to <class>Node</class>
1306for generating a pretty printable version of the node.</item>
1307<item><lit>xsc.Node.name</lit> no longer is a class method, but a
1308class attribute, that will be set at class instantiation time
1309by the meta class.</item>
1310</ulist>
1311</section>
1312
1313
1314<section><title>Changes in 1.3 (released 02/12/2002)</title>
1315<ulist>
1316<item>Ported to Python 2.2. <class>Node</class> is now derived from
1317<class>object</class>, <class>Frag</class> from <class>list</class> and
1318there's a new class <class>Attrs</class> which is derived from
1319<class>dict</class> for the attribute mappings. All presenters
1320have been adapted to work with <class>Attrs</class>.
1321In addition to the usual dictionary methods and operators <class>Attrs</class>
1322has a method <method>without</method> that returns a copy of the
1323<class>Attrs</class> instance with some specified attributes removed.</item>
1324<item>All the node classes now have a new method <method>walk</method> that generates
1325all nodes in the tree using the new generator feature of Python 2.2.</item>
1326<item>Also a new method <method>walkPath</method> has been added that works the
1327same as <method>walk</method> but yields the complete path to each node
1328as a list.</item>
1329<item>Added a class <class>block</class> to <module>xist.ns.jsp</module>.
1330The content of the <class>block</class> instance will simply be enclosed
1331in a <lit>{}</lit> block. <module>xist.ns.php</module> got such
1332a class too.</item>
1333<item>Added a new module <module>xist.ns.ihtml</module> for
1334i-mode &html;.</item>
1335<item>Added new modules <module>xist.ns.css</module> and
1336<module>xist.ns.cssspecials</module> for generating &css;.</item>
1337<item>Now the various attributes of the <class>Converter</class> object
1338are collected in a <class>ConverterState</class> object and it's possible
1339to push and pop those states, i.e. it's now easy to temporarily modify a
1340converter object during a <method>convert</method> call and revert back
1341to a previous state afterwards.</item>
1342<item><function>parseURL</function> and <function>parseTidyURL</function>
1343now have an additional parameter <lit>headers</lit> which is a list of
1344string pairs specifying additional headers to be passed in with the
1345request.</item>
1346<item><function>parseString</function> has an additional parameter
1347<lit>systemId</lit> which will be the system id of the
1348<class>InputSource</class>.</item>
1349<item>The distribution now includes the makefile and the &xml;
1350source files so now the distribution can rebuild ifself.</item>
1351<item>Various other small bugfixes and enhancements.</item>
1352</ulist>
1353</section>
1354
1355
1356<section><title>Changes in 1.2.5 (released 12/03/2001)</title>
1357<ulist>
1358<item>Added a new element <class>contentscripttype</class> to
1359<module>xist.ns.meta</module> that generates a
1360<lit>&lt;meta http-equiv="Content-Script-Type" ...&gt;</lit>
1361element.</item>
1362<item><function>xist.ns.doc.explain</function> now generates anchor elements
1363for the class, function and method description, so now the
1364links on the &xist; webpages work.</item>
1365<item>Docstrings and documentation has been reworked. Now
1366<class>xist.ns.doc.pyref</class> no longer implies a font change.
1367Use the classes <class>xist.ns.doc.module</class>, <class>xist.ns.doc.class</class>,
1368<class>xist.ns.doc.method</class>, <class>xist.ns.doc.function</class> and
1369<class>xist.ns.doc.arg</class> to mark up your Python identifiers.</item>
1370<item>Added the attributes <lit>type</lit> and <lit>key</lit>
1371to <class>xist.ns.struts_config.data_source</class>.</item>
1372</ulist>
1373</section>
1374
1375
1376<section><title>Changes in 1.2.4 (released 11/23/2001)</title>
1377<ulist>
1378<item>Added the deprecated attributes <lit>start</lit> to
1379<class>xist.ns.html.ol</class> and <lit>value</lit> to
1380<class>xist.ns.html.li</class>.</item>
1381</ulist>
1382</section>
1383
1384
1385<section><title>Changes in 1.2.3 (released 11/22/2001)</title>
1386<ulist>
1387<item>Added missing <method>asPlainString</method> methods to
1388<class>Comment</class> and <class>DocType</class>.</item>
1389</ulist>
1390</section>
1391
1392
1393<section><title>Changes in 1.2.2 (released 11/16/2001)</title>
1394<ulist>
1395<item><method>xist.url.URL.fileSize</method> and <method>xist.url.URL.imageSize</method>
1396now use the warning framework to report errors.</item>
1397<item>There is a new presenter named <class>CodePresenter</class> that dumps the
1398tree as Python source code.</item>
1399<item>The filenames of the pixel images used by <class>xist.ns.specials.pixel</class>
1400have changed. These images are now included.</item>
1401</ulist>
1402</section>
1403
1404
1405<section><title>Changes in 1.2.1 (released 10/08/2001)</title>
1406<ulist>
1407<item>URLs that are completely dynamic will now be left in peace when parsing
1408or publishing.</item>
1409</ulist>
1410</section>
1411
1412
1413<section><title>Changes in 1.2 (released 10/03/2001)</title>
1414<ulist>
1415<item><par><class>xist.ns.meta.keywords</class>
1416and <class>xist.ns.meta.description</class>
1417no longer call <method>asPlainString</method>
1418on their content. This makes it possible to e.g. generate the keywords via &jsp;:</par>
1419<example>
1420<prog>
1421&gt;&gt;&gt; from xist import parsers
1422&gt;&gt;&gt; from xist.ns import meta, jsp
1423&gt;&gt;&gt; s = '&lt;keywords&gt;' + \
1424...     '&lt;?jsp:expression "foo"?&gt;' + \
1425...     '&lt;/keywords&gt;'
1426&gt;&gt;&gt; e = parsers.parseString(s)
1427&gt;&gt;&gt; print e.conv().asBytes()
1428&lt;meta name="keywords" content="&lt;%= "foo" %&gt;" /&gt;
1429</prog>
1430</example>
1431</item>
1432<item>When an element occurs inside an attribute during publishing, there
1433won't be an exception raised any more. Instead the content of the element
1434will be published. This fixes problems with abbreviation entities inside
1435attributes.</item>
1436<item><class>xist.parsers.TidyURLInputSource</class> now uses the new
1437experimental eGenix mx Extension package, which includes a Python
1438port of <app>tidy</app>.</item>
1439<item><method>__repr__</method> now uses the new class <class>presenters.PlainPresenter</class>
1440which gives a little more info than the default <method>__repr__</method>.</item>
1441<item>URL handling has been changed again. Upto now, <class>URLAttr</class> had
1442an additional instance attribute <lit>base</lit>, which was the <z>base</z> file/URL
1443from which the attribute was parsed. Now the base URL will be directly incorporated
1444into the URL. You can pass the base URL to all the parsing functions. Similar to
1445that when publishing you can specify a base URL. All URLs in the tree will be
1446output relative to this base URL. Joining URLs is now done via <method>__div__</method>
1447and no longer via <method>__add__</method>. This makes it more consistent with
1448<module>fileutils</module>. The plan is to make URLs string like immutable objects
1449and to merge them with <class>fileutils.Filename</class>.</item>
1450<item><class>xist.ns.specials.php</class> has been moved to its own
1451module (<module>xist.ns.php</module>). This module provided additional
1452convenience processing instructions (just like <module>xist.ns.jsp</module>
1453does).</item>
1454</ulist>
1455</section>
1456
1457
1458<section><title>Changes in 1.1.3 (released 09/17/2001)</title>
1459<ulist>
1460<item>The global namespace registry now keeps a sequential list of all registered
1461namespaces, which will be used by the parser when searching for names. This
1462gives a predictable search order even without using <class>Namespaces</class>
1463and its <method>pushNamespace</method> method: modules imported last will be searched
1464first.</item>
1465<item>Processing instructions are now allowed inside attributes when
1466publishing.</item>
1467<item><module>xist.ns.docbooklite</module> has been renamed to <module>xist.ns.doc</module>.
1468It can now generate &html; and Docbook output and has improved a lot. The &xist; web pages
1469now use this for automatic documentation generation. The doc example has been removed.</item>
1470<item><class>xist.url.URL</class> now has a new method <method>info</method> that returns the headers
1471for the file/URL.</item>
1472<item><class>xist.url.URL</class> now has a methods <method>fileSize</method> and <method>imageSize</method>
1473too.</item>
1474<item><class>xist.ns.jsp.directive_page</class> now has new attribute <lit>session</lit>.</item>
1475</ulist>
1476</section>
1477
1478
1479<section><title>Changes in 1.1.2 (released 08/21/2001)</title>
1480<ulist>
1481<item><method>__repr__</method> now uses the new class <class>presenters.PlainPresenter</class>
1482which gives a little more info than the default <method>__repr__</method>.</item>
1483</ulist>
1484</section>
1485
1486
1487<section><title>Changes in 1.1.1 (released 08/01/2001)</title>
1488<ulist>
1489<item>Small bugfix in <function>presenters.strProcInst</function></item>
1490<item>fixed <class>xist.ns.struts_html.option</class> to allow content</item>
1491</ulist>
1492</section>
1493
1494
1495<section><title>Changes in 1.1 (released 07/19/2001)</title>
1496<ulist>
1497<item>Sequences in constructor arguments for <class>Frag</class> and
1498<class>Element</class> are again expanded and it's again possible
1499to pass dictionaries in an <class>Element</class> constructor to
1500specify attributes. As sequences are always unpacked, the method
1501<method>extend</method> is gone. This works for <method>append</method>
1502and <method>insert</method> too.</item>
1503
1504<item><par><class>Node</class> and <class>Frag</class> implement
1505<method>__mul__</method> and <method>__rmul__</method>, so you can do stuff like:</par>
1506<prog>
1507html.br()*5
1508</prog>
1509<par>This returns a <class>Frag</class> with five times to same node.</par></item>
1510
1511<item><par>Arguments for the converter constructor can be passed to
1512<method>xist.xsc.Node.conv</method> now, so it's possible to do stuff like this:</par>
1513<prog>
1514from xist.ns import code
1515print code.Eval("return converter.lang") \
1516    .conv(lang="en").asBytes()
1517</prog>
1518<par>which will print <lit>en</lit>.</par></item>
1519<item>The option <arg>XHTML</arg> for the publishers has been changed
1520to lowercase.</item>
1521<item><class>xist.ns.html.html</class> will automatically generate a
1522<lit>lang</lit> and <lit>xml:lang</lit> attribute when the
1523converter has a language set.</item>
1524</ulist>
1525</section>
1526
1527
1528<section><title>Changes in 1.0 (released 06/18/2001)</title>
1529<ulist>
1530<item>New module for &wml; 1.3.</item>
1531
1532<item>The publishing interface has changed internally
1533and publishing should be faster now.</item>
1534
1535<item>Publishers now support a new parameter:
1536<arg>usePrefix</arg>, which specifies if namespace prefixes
1537should be output for the element names.</item>
1538
1539<item>Part of the implementation of the publishing
1540stuff has been moved to C, so now you'll need
1541a C compiler to install &xist;.</item>
1542
1543<item>When publishing <lit>"</lit>, it will now only be replaced with
1544<lit>&amp;quot;</lit> inside attributes.</item>
1545
1546<item>All the <method>asHTML</method> methods now have an additional argument
1547<arg>converter</arg>. This makes it possible
1548to implement different processing modes or stages
1549for new elements. All currently implemented elements and
1550entities ignore this argument, but pass it on
1551in the call to their childrens' <method>asHTML</method> method.
1552As the name <method>asHTML</method> no longer makes sense, <method>asHTML</method>
1553has been renamed to <method>convert</method>.</item>
1554
1555<item>There is now a tool <filename>dtd2xsc.py</filename> in the
1556<filename>scripts</filename> directory that creates
1557a skeleton &xist; module from a &dtd; (this requires <app>xmlproc</app>
1558from the <app>PyXML</app> package).</item>
1559
1560<item>New preliminary module for DocBook 4.12.
1561(Incomplete: <method>convert</method> methods and Unicode character
1562entities are missing; any volunteers for implementing 375 classes?)</item>
1563
1564<item>New module <filename>ruby.py</filename> that implements the
1565<link href="http://www.w3.org/TR/ruby/xhtml11-ruby-1.mod">W3C Ruby draft</link>.
1566</item>
1567
1568<item><filename>sql.py</filename> has been removed from &xist;, but is available
1569as a <link href="root:sql/index.html">separate module</link>.</item>
1570
1571<item>The parsing interface has been changed. Parsing is now done
1572with the functions <function>parseFile</function>, <function>parseString</function>,
1573<function>parseURL</function> and <function>parseTidyURL</function> in the module
1574<module>parsers</module>. It's now possible to specify which parser should
1575be used for parsing by passing a SAX2 parser instance to any of
1576these functions. &xist; now includes a rudimentary SAX2 driver
1577for <class>sgmlop</class> and a rudimentary &html; parser that
1578emits SAX2 events.</item>
1579
1580<item>The python-quotes example has been updated to work with expat.</item>
1581
1582<item>Added a new example: media.</item>
1583
1584<item>All abbreviation entities have been moved to
1585a new module <filename>abbr.py</filename>.</item>
1586
1587<item>All the modules that provide new elements and entitites
1588have been moved to a subpackage <module>ns</module>.</item>
1589
1590<item><class>Frag</class> and <class>Element</class>
1591now have new methods <method>sorted</method>,
1592<method>reversed</method>, <method>filtered</method> and
1593<method>shuffled</method> that return sorted, reversed, filtered
1594and shuffled versions of the <class>Frag</class>/<class>Element</class>
1595object.</item>
1596
1597<item>New namespace modules <filename>ns/jsp.py</filename> and
1598<filename>ns/struts_html.py</filename> have been added that allow you to
1599use <link href="http://java.sun.com/products/jsp/">&jsp;</link> and
1600<link href="http://jakarta.apache.org/struts/">Struts</link> tags with &xist;.</item>
1601
1602<item>A new method <method>asText</method> was added, that returns
1603the node as a formatted plain &ascii; text (this requires that
1604<app moreinfo="http://w3m.sf.net/">w3m</app>
1605is installed.)</item>
1606
1607<item><filename>make.py</filename> has been renamed to
1608<filename>xscmake.py</filename> and moved to the
1609<dirname>scripts</dirname> directory,
1610it will be installed as a callable script with <lit>python setup.py install_scripts</lit>.</item>
1611
1612<item><filename>xscmake.py</filename> has a new option <option>--files</option>/<option>-f</option>.
1613The argument is a file containing a list of filenames (one
1614name per line) that should be converted.</item>
1615
1616<item><filename>xscmake.py</filename> has a new option <option>-r</option>/<option>--parser</option>
1617for specifying which parser to use. Allowed values are <lit>sgmlop</lit>
1618and <lit>expat</lit>.</item>
1619
1620<item><par><filename>xscmake.py</filename> has a new option <option>-n</option>/<option>--namespace</option>
1621that can be used for appending <class>Namespace</class>
1622objects to the <class>Namespaces</class> object used by <filename>xscmake.py</filename>.</par>
1623<example>
1624<title>Using the --namespace option</title>
1625<prog>
1626xscmake.py -n html -n spam eggs.xsc
1627</prog>
1628</example>
1629<par>With this call the parser will find element classes from the
1630module with the prefix name <lit>spam</lit> before those
1631from <lit>html</lit> and those before anything else.</par></item>
1632
1633<item><class>xist.url.URL</class> no longer has an attribute
1634<lit>ext</lit>. <lit>file</lit> and <lit>ext</lit> are
1635merged.</item>
1636
1637<item>The special treatment of sequences as constructor arguments
1638to <class>Frag</class> and <class>Element</class>
1639has been removed, so &xist; will no longer remove one level of
1640nesting. If you still want that, use a <lit>*</lit> argument.</item>
1641
1642<item><class>Frag</class> and <class>Element</class>
1643now have a new method <method>mapped</method>,
1644that recursively maps the nodes through a function. This is like
1645<method>convert</method> but via an external function.</item>
1646
1647<item><par>Attribute handling has been improved thanks to a suggestion
1648by Hartmut Goebel: <method>Element.__getitem__</method> now
1649always works as long as the attribute name is legal. If the attribute
1650is not set, an empty attribute will be returned. All empty attributes
1651will be considered as being not set and so <method>hasAttr</method>
1652returns <lit>0</lit> for them, and <method>publish</method> doesn't
1653publish them. This simplifies several very common cases:</par>
1654<ulist>
1655<item>Copying an attribute from one element to another works regardless
1656of whether the attribute is set or not;</item>
1657<item>Testing for an attributes presence can now be done much
1658simpler: <lit>if element["attrname"]</lit> instead of
1659<lit>if element.hasAttr("attrname")</lit> (which still
1660works, and should be a little faster);</item>
1661<item><par>When you construct a &dom; tree and the presence or absence
1662of an attribute is tied to a condition, you can construct the attribute
1663in advance and use it afterwards in the tree construction:</par>
1664<prog>
1665if <rep>condition</rep>:
1666    align = "right"
1667else:
1668    align = None
1669node = html.div("spam", align=align)
1670</prog>
1671<par>So, when the <lit><rep>condition</rep></lit> is false,
1672the node will not have the attribute <lit>align</lit> set.</par></item>
1673</ulist>
1674</item>
1675<item><par><class>xist.ns.cond.If</class> (and <class>xist.ns.cond.ElIf</class>)
1676can now be used to test for attributes of the converter. I.e. it's possible to
1677write the following &xml;:</par>
1678<prog>
1679&lt;if lang="en"&gt;Title
1680&lt;elif lang="de"&gt;Überschrift
1681&lt;/if&gt;
1682</prog>
1683</item>
1684<item>URL handling has be completely changed and is much, much simpler now.
1685There are no more path markers. To specify an URL that is relative to the
1686current directory use the scheme <lit>root</lit> (e.g. <lit>root:main.css</lit>).</item>
1687</ulist>
1688</section>
1689
1690
1691<section><title>Changes in 0.4.7 (released 11/24/2000)</title>
1692<ulist>
1693<item>Fixed a bug in the entity handling.</item>
1694
1695<item>Added a few deprecated elements and attributes to
1696the <module>html</module> module.</item>
1697
1698<item>Improved the publishing of attributes. Now all attribute
1699values will be published. For boolean attributes no value
1700will be published for <lit>XHTML==0</lit> and the attribute
1701name will be used for <lit>XHTML==1</lit> or <lit>XHTML==2</lit>.</item>
1702
1703<item><method>Element.compact</method> now works (better) ;).</item>
1704
1705<item>Incorparated many bug fixes from Hartmut Goebel.</item>
1706
1707<item>Implemented <method>xsc.Element.copyDefaultAttrs</method>, which copies
1708unset attributes over from a dictionary (simplifies
1709implementing <class>specials.plaintable</class> and <class>specials.plainbody</class>)</item>
1710
1711<item><method>providers.Provider.pushNamespace</method> now handles multiple
1712arguments which may be <class>Namespace</class> objects or modules
1713(in which case, <lit><rep>module</rep>.namespace</lit> will be pushed)</item>
1714
1715<item><method>providers.Providers.popNamespace</method> can now pop multiple
1716namespaces at once.</item>
1717
1718<item><class>providers.TidyURIProvider</class> now uses <function>os.popen3</function> for
1719piping the file through tidy, so now there will be
1720no more temporary files. The call to tidy now includes
1721options that hopefully make the output more suited to
1722&xist;.</item>
1723
1724<item>Incorparated a new <filename>url.py</filename> by Hartmut Goebel, that fixes
1725many problem (e.g. optimizing <lit>http://server/foo/bar/../../baz.gif</lit>
1726now works.)</item>
1727
1728<item><filename>make.py</filename> includes a new option <option>--path</option> for
1729adding directories to <lit>sys.path</lit>.</item>
1730</ulist>
1731</section>
1732
1733
1734<section><title>Changes in 0.4.6 (released 11/03/2000)</title>
1735<ulist>
1736<item>Now uses <class>sgmlop.XMLParser</class> instead of
1737<class>sgmlop.SGMLParser</class>, so case is preserved.</item>
1738
1739<item>Fixed another regression from the URL to string conversion
1740change.</item>
1741</ulist>
1742</section>
1743
1744
1745<section><title>Changes in 0.4.5 (released 11/01/2000)</title>
1746<ulist>
1747<item>Converting URLs to nodes is now done in <function>ToNode</function>,
1748so <class>URL</class> objects can be used everywhere.</item>
1749
1750<item>Fixed a few bugs in <method>Text._strtext</method> and
1751<method>URLAttr._str</method>.</item>
1752</ulist>
1753</section>
1754
1755
1756<section><title>Changes in 0.4.4 (releases 10/27/2000)</title>
1757<ulist>
1758<item>Now testing if characters can be encoded with the
1759specified encoding is done directy. This means, that
1760escaping unencodable characters now works even with
1761exotic encodings (tested with
1762<link href="http://pseudo.grad.sccs.chukyo-u.ac.jp/~kajiyama/python/"><filename>JapaneseCodecs-1.0.1.tar.gz</filename></link>).</item>
1763
1764<item>The <class>URLAttr</class> constructor now can handle a single parameter
1765of the type <class>URL</class>.</item>
1766
1767<item>The URL to string conversion function have changed:
1768<method>URL.asString</method> returns the URL with path markers,
1769<method>URL.asPlainString</method> returns the URL without path markers.</item>
1770
1771<item>Added the <lit>i18n</lit> attribute to the <class>font</class> element.</item>
1772
1773<item>Fixed the clashes between the class names for the elements
1774and entities <class>sub</class> and <class>sup</class> in <filename>html.py</filename>.</item>
1775
1776<item>Several small enhancements and bug fixes contributed by
1777Hartmut Goebel.</item>
1778</ulist>
1779</section>
1780
1781
1782<section><title>Changes in 0.4.3 (released 10/19/2000)</title>
1783<ulist>
1784<item>Now processing instruction classes are registered in the
1785same way as elements and entities are.</item>
1786
1787<item>The leaf nodes (<class>Text</class>, <class>Comment</class>,
1788<class>ProcInst</class>) are now considered immutable.
1789This means that their <method>asHTML</method> method can
1790simply return <self/>, because now those nodes can be shared between
1791trees. Functionality for manipulation the objects is provided by a mixin
1792class very similar to <class>UserString</class>. All this results
1793in a speedup of about 10% for the python-quotes example.</item>
1794
1795<item>Small optimizations in the <method>asHTML</method> methods of <class>Element</class> and
1796<class>Frag</class> optimized away many calls to <method>append</method>,
1797<method>extend</method> and <method>ToNode</method> and result in a speedup
1798of about 30% for the python-quotes example. One consequence of this is
1799that <class>Null</class> objects will no longer be ignored.</item>
1800</ulist>
1801</section>
1802
1803
1804<section><title>Changes in 0.4.2 (released 09/24/2000)</title>
1805<ulist>
1806<item>New elements <class>keywords</class> and <class>description</class> in
1807<filename>meta.py</filename>.</item>
1808
1809<item>Fixed a bug in <method>Namespace.register</method>, now setting <lit>name=None</lit>
1810to prevent an element from being registered works again.</item>
1811</ulist>
1812</section>
1813
1814
1815<section><title>Changes in 0.4.1 (released 09/21/2000)</title>
1816<ulist>
1817<item>A new module named <filename>meta.py</filename> has been created, that simplifies
1818generating meta tags.</item>
1819
1820<item>Various small bugfixes.</item>
1821</ulist>
1822</section>
1823
1824
1825<section><title>Changes in 0.4 (released 09/19/2000)</title>
1826<ulist>
1827<item>&xist; now requires at least Python 2.0b1.</item>
1828
1829<item>A new bugfixed version of the <app>sgmlop</app> source is available
1830from the <link href="ftp://ftp.livinglogic.de/pub/livinglogic/xist/">&ftp; site</link>.</item>
1831
1832<item>&xist; now completely supports Unicode. For output any
1833encoding known to Python can be used, so now you
1834can output your &html; in ASCII, Latin-1, UTF-8, UTF-16, ...</item>
1835
1836<item>All publishers have been updated to support Unicode.
1837The publishing interface has been streamlined (<arg>encoding</arg>
1838and <arg>XHTML</arg> parameters are now attributes of the publisher).</item>
1839
1840<item><method>asString</method> will now always return a Unicode string. If you
1841want a byte string use <method>asBytes</method> instead, where the encoding
1842can be specified as an argument.</item>
1843
1844<item>There an additional publisher class <class>FilePublisher</class>, which can
1845be used for publishing to a file (or anything else that has
1846a <method>write</method> and a <method>writelines</method> method, and is supported by the stream
1847writer available through <function>codecs.lookup</function>).</item>
1848
1849<item>Element and attribute names are no longer converted to lowercase.
1850If you have an attribute name which clashes with a Python
1851keyword (e.g. <lit>class</lit>) append an underscore (<lit>_</lit>),
1852which will be removed before accessing the attribute. This is the <z>official</z>
1853Python method for handling these cases.</item>
1854
1855<item>Elements and entities are no longer registered one by one. Now
1856you can build <class>Namespace</class> objects which are used for searching
1857and there are <method>pushNamespace</method> and <method>popNamespace</method>
1858functions in <module>XSC.xsc</module>. For more info, see the source.</item>
1859
1860<item>Image size calculation has been removed from <class>html.img</class> and
1861<class>html.input</class>. Use <class>specials.autoimg</class> and
1862<class>specials.autoinput</class> for that.</item>
1863
1864<item><method>__getitem__</method>, <method>__setitem__</method> and <method>__delitem</method>
1865of <class>Frag</class> and <class>Element</class> now accepts a list as an argument.
1866The method will be applied recursively, i.e. <lit>e[[0, 1, "foo", 2]</lit> is the
1867same as <lit>e[0][1]["foo"][2]</lit>.</item>
1868
1869<item>The deprecated module <filename>db.py</filename> no longer exists. Useful functions and elements
1870from <filename>db.py</filename> have been moved to <filename>sql.py</filename> and
1871<filename>form.py</filename> respectively.</item>
1872
1873<item>When using <function>xsc.make</function> the encoding and XHTML parameters to use can now
1874be specified on the command line (e.g. <lit>--encoding utf-8 --xhtml 2</lit>)</item>
1875
1876<item><par>Handling of multiline <markup>&lt;?xsc-eval?&gt;</markup> and <markup>&lt;?xsc-exec?&gt;</markup>
1877has been enhanced, although, &xist; will not be able to guess the correct indentation
1878in all cases. As a workarround simply add a Python comment to the beginning:</par>
1879<prog>
1880&lt;?xsc-exec
1881    for i in xrange(10):
1882        do(i)
1883?&gt;
1884</prog>
1885<par>won't work</par>
1886<prog>
1887&lt;?xsc-exec
1888    #
1889    for i in xrange(10):
1890        do(i)
1891?&gt;
1892</prog>
1893<par>will.</par>
1894</item>
1895
1896<item><par>Make functionality has been moved to <filename>make.py</filename>, as certain modules can't
1897be used as the main script, because reimporting them in processing
1898instructions won't work. Now you can simply call</par>
1899<example>
1900<title>The new make script</title>
1901<prog>make.py --import xist.html --import spam eggs.xsc</prog>
1902</example>
1903</item>
1904
1905<item><par>There is a new module <filename>cond.py</filename>, that contains
1906elements that can be used for conditionals:</par>
1907<prog>
1908&lt;?xsc-exec a=42?&gt;
1909&lt;if cond="a==21"&gt;
1910    &lt;b&gt;foo&lt;/b&gt;
1911&lt;elif cond="a==42"/&gt;
1912    &lt;i&gt;bar&lt;/i&gt;
1913&lt;else/&gt;
1914    baz
1915&lt;/if&gt;
1916</prog>
1917</item>
1918</ulist>
1919</section>
1920
1921
1922<section><title>Changes in 0.3.9 (released 08/10/2000)</title>
1923<ulist>
1924<item><app>sgmlop</app> will now be found either via <lit>import sgmlop</lit>
1925or via <lit>from xml.parsers import sgmlop</lit>.</item>
1926</ulist>
1927</section>
1928
1929
1930<section><title>Changes in 0.3.8 (released 07/14/2000)</title>
1931<ulist>
1932<item>Fixed a bug in <method>URLAttr.publish</method>, which prevented
1933<class>URLAttr</class> from working at all.</item>
1934</ulist>
1935</section>
1936
1937
1938<section><title>Changes in 0.3.7 (released 07/06/2000)</title>
1939<ulist>
1940<item>Fixed a bug in <class>html.img</class> and <class>html.input</class>.
1941Now image size calculation works again.</item>
1942</ulist>
1943</section>
1944
1945
1946<section><title>Changes in 0.3.6 (released 07/04/2000)</title>
1947<ulist>
1948<item>Fixed a bug in <method>Node._matches</method>, which resulted in a non working
1949<method>find</method>.</item>
1950</ulist>
1951</section>
1952
1953
1954<section><title>Changes in 0.3.5 (released 07/02/2000)</title>
1955<ulist>
1956<item>The documentation example has been enhanced. Now documenting methods works.</item>
1957
1958<item>When the member <lit>elementname</lit> in the element class is set before calling
1959<function>registerElement</function>, this element name will be used for the element. This
1960allows custom names even when using <function>registerAllElements</function>.</item>
1961
1962<item>Comparison of scheme and server in URLs is done case insensitive
1963(as <link href="http://www.ietf.org/rfc/rfc2068.txt">RFC 2068</link>
1964requires.)</item>
1965
1966<item><par>Image size calculation is now done in <method>asString</method> and
1967not in <method>asHTML</method>.
1968This allows to write faster code. Old method:</par>
1969<prog>e = html.div(html.img(...),gurk.hurz()).asHTML().asString()</prog>
1970<par>New method</par>
1971<prog>e = html.div(html.img(...),gurk.hurz().asHTML()).asString()</prog></item>
1972
1973<item>Image size calculation is now done for <markup>&lt;input type="image"&gt;</markup>.
1974The <lit>size</lit> attribute is set to the image width.</item>
1975
1976<item><par>Manipulating the path in an &url; is now done via the usual
1977<method>__setitem__</method>/<method>__getitem__</method> stuff,
1978which keeps the path in a consistent state.</par>
1979<prog>
1980&gt;&gt;&gt; from xist.URL import URL
1981&gt;&gt;&gt; u = URL("/foo/*/../bar/baz.gif")
1982&gt;&gt;&gt; del u[1]
1983&gt;&gt;&gt; u
1984URL(scheme='server', path=['bar'], file='baz', ext='gif')
1985</prog>
1986</item>
1987
1988<item><method>findNodes</method> (which has been shortened to <method>find</method>)
1989has an additional argument <arg>test</arg>, which can be a test function that will
1990be called when the node passes all other tests.</item>
1991
1992<item><method>asString</method> no longer generates a string directly, but uses the new method
1993<method>publish</method>, which has an additional argument <arg>publisher</arg>,
1994to which the strings to be output are passed.</item>
1995</ulist>
1996</section>
1997
1998
1999<section><title>Changes in 0.3.4 (released 05/31/2000)</title>
2000<ulist>
2001<item>Location information is now copied over in <method>clone</method>, <method>asHTML</method>
2002and <method>compact</method> where appropriate, so you know even in the &html; tree
2003where something came from.</item>
2004
2005<item><par><lit>xsc.repransi</lit> can now have three values:</par>
2006<ulist>
2007<item><lit>0</lit>: coloring is off</item>
2008<item><lit>1</lit>: coloring is on for a dark background</item>
2009<item><lit>2</lit>: coloring is on for a light background</item>
2010</ulist>
2011<par>All <lit>repransi</lit> variables are now arrays with two strings,
2012the first for dark, the second for light.</par></item>
2013</ulist>
2014</section>
2015
2016
2017<section><title>Changes in 0.3.3 (released 05/30/2000)</title>
2018<ulist>
2019<item>The workaround for the trailing CDATA bug in <app>sgmlop</app> has been removed, so now
2020you'll need a newer version of <app>sgmlop</app> (included in <app>PyXML 0.5.5.1</app>)</item>
2021</ulist>
2022</section>
2023
2024
2025<section><title>Changes before 0.3.3</title>
2026<ulist>
2027<item>These changes predate written history.</item>
2028</ulist>
2029</section>
Note: See TracBrowser for help on using the browser.