root/livinglogic.python.xist/NEWS.rst @ 3235:7db190e66e1d

Revision 3235:7db190e66e1d, 73.9 KB (checked in by Walter Doerwald <walter@…>, 12 years ago)

The pseudo-elements in ll.xist.ns.jsp are no longer in a namespace.

This means they will always be published without any prefixes.
(In particular they won't steal the empty prefix from the HTML namespace.)

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