root/livinglogic.python.xist/NEWS.rst @ 3192:ac7e04cf9edc

Revision 3192:ac7e04cf9edc, 72.7 KB (checked in by Walter Doerwald <walter@…>, 12 years ago)

The href of a stylesheet link wasn't applied to the stylesheet itself (only to the imported stylesheets in it).

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