root/livinglogic.python.xist/NEWS.rst @ 3711:a539aff0e476

Revision 3711:a539aff0e476, 87.3 KB (checked in by Walter Doerwald <walter@…>, 10 years ago)

Add a reversed function to UL4 (issue #5). Bump file format version.

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