root/livinglogic.python.xist/NEWS.rst @ 3479:c45d51fa4531

Revision 3479:c45d51fa4531, 78.2 KB (checked in by Walter Doerwald <walter@…>, 11 years ago)

Fix names of UL4 related make actions.

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