root/livinglogic.python.xist/NEWS.rst @ 3710:67e522e934cc

Revision 3710:67e522e934cc, 87.1 KB (checked in by Walter Doerwald <walter@…>, 10 years ago)

xfind.attrhasvalue() and friends now support multiple values (issue #3).

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