Skip to main content

Extensible HTML/XML generator

Project description

XIST is an extensible HTML and XML generator. XIST is also a XML parser with a very simple and pythonesque tree API. Every XML element type corresponds to a Python class and these Python classes provide a conversion method to transform the XML tree (e.g. into HTML). XIST can be considered ‘object oriented XSLT’.

XIST also includes the following modules:

  • ll.astyle can be used for colored terminal output (via ANSI escape sequences).

  • ll.color provides classes and functions for handling RGB color values. This includes the ability to convert between different color models (RGB, HSV, HLS) as well as to and from CSS format, and several functions for modifying and mixing colors.

  • ll.make is an object oriented make replacement. Like make it allows you to specify dependencies between files and actions to be executed when files don’t exist or are out of date with respect to one of their sources. But unlike make you can do this in a object oriented way and targets are not only limited to files, but you can implement e.g. dependencies on database records.

  • ll.misc provides several small utility functions and classes.

  • ll.sisyphus provides classes for running Python scripts as cron jobs.

  • ll.daemon can be used on UNIX to fork a daemon process.

  • ll.url provides classes for parsing and constructing RFC 2396 compliant URLs.

  • ll.xpit is a module that makes it possible to embed Python expressions in text (as XML style processing instructions).

  • ll.ul4c is compiler for a templating language with similar capabilities to Django’s templating language. UL4 templates are compiled to an internal bytecode format, which makes it possible to implement template renderers in other languages and makes the template code “secure” (i.e. template code can’t open or delete files).

  • ll.xml_codec contains a complete codec for encoding and decoding XML.

Changes in 3.4 (released 08/19/2008)

  • Templates can no longer be passed as a separate dictionary to UL4 templates but are passed as variables like other data objects too.

  • Strings in UL4 have gained a new method capitalize.

  • Printing XML escaped strings in UL4 has now gained its own tag and opcode. <?printx foo?> is equivalent to <?print xmlescape(foo)?>.

  • Exception handling in UL4 has been rewritten to allow proper error reporting when calling nested templates.

  • UL4 has gained a new function zip. It can be called with two or three arguments and does what itertools.zip does.

  • UL4 has gained another new function: type returns the type of its argument as a string.

  • UL4 now supports tuple unpacking in <?for?> tag with three variables.

  • UL4 has a new tag for comments: <?note This is comment?>.

  • A new script db2ul4 has been added that can render UL4 templates with database content.

  • In UL4s <?render?> tags it’s now possible to pass along a complete argument dictionary via the **arg syntax just like in Python. This syntax can even be used multiple times in the call. This syntax is available in dictionary literals too, i.e. {1:2, 3:4} and {**{1:2}, **{3:4}} are equivalent.

  • A new UL4 function get has beenm added that works similar to the dictionary method get, but works with global variables.

  • The missing processing instruction render has been added to ll.xist.ns.ul4.

  • xml_codec now partially works, even if the C module is missing. As long as you explicitely specify an encoding on parsing and publishing, it should work.

  • A new processing instruction class ll.xist.AttrProcInst has been introduced. When an AttrProcInst node is the first node in an attribute, it takes over publishing of the attribute. In all other cases the processing instruction disappears completely. UL4 uses this to implement “conditional attributes” (via the new classes attr_if and attr_ifnn).

  • Building trees with with blocks has changed slightly. Nodes used in with blocks and with + are now passed to a with handler instead of building the tree directly. This fixes a problem when nested convert calls use with blocks.

  • The element ll.xist.ns.form.memo has been renamed to textarea and ll.xist.ns.form.edit has been renamed to text. Classes ll.xist.ns.form.button and ll.xist.ns.form.file have been added.

  • Iterating through the inputs in ll.make actions has been fixed (i.e. the additional inputs will be output too). ll.make.Project.findpaths has been fixed to work with non-ll.make.Action inputs. (This means that now you have to pass a real registered target action to findpaths not just its key).

  • ll.make has gained a new action: XISTStringAction publishes an XIST node as a unicode string. XISTPublishAction has been renamed to XISTBytesAction.

  • Fixed a bug in the caching logic in ll.make.CacheAction.

  • ll.make.CallMethAction has been renamed to CallAttrAction because it can be used to e.g. call functions in a module too.

  • The properties showaction, showstep and shownote of ll.make.Project object can now be assigned booleans as well (which results in all or no actions being shown.

  • The version number for cssutils has been bumped to 0.9.5.1.

Project details


Release history Release notifications | RSS feed

This version

3.4

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

ll-xist-3.4.zip (439.6 kB view hashes)

Uploaded Source

ll-xist-3.4.tar.gz (372.7 kB view hashes)

Uploaded Source

ll-xist-3.4.tar.bz2 (316.5 kB view hashes)

Uploaded Source

Built Distributions

ll_xist-3.4-py2.5-win32.egg (733.6 kB view hashes)

Uploaded Source

ll_xist-3.4-py2.5-macosx-10.5-i386.egg (738.4 kB view hashes)

Uploaded Source

ll-xist-3.4.win32-py2.5.exe (415.5 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page