Sat Jan 08 2005 11:12 lxml.etree is getting there:
The lxml.etree implementation of ElementTree, on top of libxml2, is
getting there now. It features automatic memory management and quite a bit of ElementTree compatibility. Not all of the ElementTree API has been implemented yet, but enough for many use cases.
[More]
Wed Jan 12 2005 20:07 lxml parser performance:
In a discussion with Fredrik Lundh about his (c)ElementTree parser
performance benchmarks on the lxml.etree implementation.
[More]
Thu Jan 13 2005 20:33 lxml findall and xpath performance:
Update: lxml got quite a bit faster since this entry, see here
[More]
Fri Jan 14 2005 19:15 lxml progress:
Since some people seem to be actually reading this and some progress has been made, I thought I'd give a report of what's been happening with lxml.
Since last week, I've added a lot more of the ElementTree API, such
as the .find() function and friends, by directly using the code
from ElementTree.
I actually am running the ElementTree and cElementTree test suites
now. I still need to disable some tests, but a significant fraction
is indeed running.
I've improved the way libxml2's parser functionality gets used, in
order to implement libxml2's top-level parse() function.
I've added XPath support to lxml.etree! An example of what you can
do:
>>> from lxml import etree
>>> tree = etree.parse('ot.xml')
>>> tree.xpath('(//v)[5]/text()')
[u'And God called the light Day, and the darkness he called Night.
And the evening and the morning were the first day.\n']
or, say, this, modifying the elements returned:
>>> result = tree.xpath('(//v)[5]')
>>> result[0].text = 'The day and night verse.'
>>> tree.xpath('(//v)[5]/text()')
[u'The day and night verse.']
I've added the start of XSLT support to lxml.etree. An example:
test.xslt
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="*" />
<xsl:template match="/">
<day><xsl:value-of select="(//v)[5]" /></day>
</xsl:template>
</xsl:stylesheet>
>>> from lxml import etree
>>> style_xml= etree.parse('test.xslt')
>>> style = etree.XSLT(style_xml)
>>> ot = etree.parse('ot.xml')
>>> result = style.apply(ot)
>>> style.tostring(result)
u'<?xml version="1.0"?>\n<day>And God called the light Day, and the
darkness he called Night. And the evening and the morning were the
first day.\n</day>\n'
>>> result.getroot().tag
u'day'
[More]
Mon Jan 17 2005 22:31 lxml performance progress:
Such progress a few days can bring. Just last week the lxml.etree
performance figures on ElementTree operations like findall lost
out badly to pure Python code. So badly, it was pretty embarassing:
findall('//v') on ot.xml
ElementTree: 0.13 s
cElementTree: 0.11 s
lxml.etree: 1.9 s
[More]
Tue Jan 18 2005 19:30 a little bit more lxml performance tweaking:
Today I merged the backpointer branch with the lxml trunk, and have
been cleaning up a bit more. In particular I've cleaned up some useless extra subclasses that were only necessary to introduce weak reference support to the various classes. I've now removed these subclasses, which cleans things up a bit more.
[More]
(1) Fri Jan 21 2005 23:46 Relax NG support, C14N:
Some progress over the last few days:
[More]
(3) Mon Jan 24 2005 20:10 benchmarks and lxml:
The recent cElementTree release is causing some waves in the Python/XML community. It started when Uche Ugbuji posted The Python Community has too many deceptive XML benchmarks to his blog.
[More]
Tue Jan 25 2005 20:01 lxml relax NG tweaks:
The Relax NG support seemed to be working for lxml, until I tried it with a complicated case: a modularized XHTML Relax NG schema.
[More]
(2) Sun Jan 30 2005 21:29 About the disdain for XML among Python programmers:
Last december Phillip Eby (PJE) posted a a nice rant. It was
widely quoted in other Python-oriented weblogs; people liked
especially the rant against XML. It was indeed a very nice rant. It still
rankled a bit with me, though, even though I've seen similar things before. This
disdain for XML technologies is very common among Python
programmers. I posted my own rant in response in a comment on
another weblog, hardly a place where it will be seen. So, I'll post a
new, edited version of my rant in my shiny new weblog, where it has at least
a bit more chance to be read. What's the good of ranting if nobody hears you, after all?
[More]
Tue Mar 01 2005 18:53 Criteria for evaluating specifications:
As Andrew Tannenbaum said, "The nice thing about standards is that
there are so many to choose from." Apparently he followed this up by:
"And if you really don't like all the standards you just have to wait
another year until the one arises you are looking for."
[More]
(5) Wed Mar 02 2005 14:50 A CMS as a pile of semi-structured data:
Paul Everitt and I have long been communicating about the role of XML in the CMS world. Recently, he posted the following blog entry and asked for my opinions per email. I started writing a mail back to him, but then I realized I have a blog now too...
[More]
Fri Mar 11 2005 14:42 Zope 3 will support XML:
Paul Everitt asks Should Zope 3 support XML?. The answer is of course, yes, it should, and, what's more, yes it will, and Infrae will be one party working on it. In fact, we've already worked on it.
[More]
Fri Mar 11 2005 19:59 Five 0.3 released!:
I'm happy to announce the release of Five 0.3 today, the Zope 3 in Zope 2 integration component. This release has great new features, including edit forms and add forms based on Zope 3 schemas. See the Five website for more information, and in particular the CHANGES.
Thanks to all the Five developers who made this release possible!
(10) Thu Mar 17 2005 15:56 Fixing the Zope release process:
In this article, I will identify problems with the Zope release
strategy, attribute blame, propose solutions, and offer some hope for
the future.
[More]
(2) Fri Mar 18 2005 14:56 How to delay a Zope release:
Jim Fulton, today, on the Zope-3 dev list:
Now that that the decision has been made to include Zope 3
in Zope 2.8, I'd really prefer that Zope 2.8 use X3.1 code,
not X3.0 code. In general, having code shared by Zope 2 and
Zope 3 will complicate deprecation, probably increasing the
length of time we must keep backward-compatibility code.
I'd like to try to keep the Zope 3 code used in Zope 2 and
the Zope 3 code used in Zope 3 in sync as much as possible.
[More]
(11) Wed Apr 06 2005 20:35 What Zope can learn from Ruby on Rails:
Ian Bicking just posted an insightful analysis of what makes Ruby on Rails work. What struck me most was the following:
[More]
(6) Fri Apr 08 2005 20:56 lxml released at last:
I've finally found the time to release lxml. So here then is
lxml, release 0.5!
[More]
(5) Sat Apr 09 2005 21:51 lxml 0.5.1 released:
I've just released version 0.5.1 of lxml, the Pythonic binding to the libxml2 and libxslt libraries. This because I got feedback to 0.5 which pointed to a critical bug in the way unicode was handled. This kind of feedback is why I should've released lxml long ago!
[More]
(2) Fri Apr 15 2005 20:38 Clarity, ClearSilver integration for Zope 3:
I've just checked in a new package into the Zope 3 base subversion repository called Clarity. What it does is integrate ClearSilver templating into Zope 3 (trunk, though I expect Zope X3.0 or even Five support should be easy enough). It's all still rough, but initial tests show ClearSilver templates can be quite a bit faster than ZPT, and they have other possible benefits. In my simplistic experiments I got transaction rates about 2 to 5 times higher than you can reach with ZPT, testing this with the 'siege' utility.
[More]
(3) Sat Apr 16 2005 00:27 the Clarity Template Language:
The ClearSilver templating language does not have a very pleasant syntax for people familiar with the TAL notation of Zope Page Templates. That's not to say ClearSilver's syntax is awful; it's deliberately simple, and I'm sure one could get used to it pretty quickly. Still, I started wondering what ClearSilver syntax would look like if it were more like TAL. Let's call such a theoretical TAL-like ClearSilver "Clarity". Perhaps this is a bit confusing, as it's the same name as the ClearSilver integration package I talked about before, but it's a nice name. :)
[More]
Thu Apr 28 2005 16:02 Five 1.0 released!:
Yesterday I've released the one dot oh version of Five, the Zope 2 product that allows you to use Zope 3 technology in Zope 2, today.
[More]
(5) Thu Apr 28 2005 16:29 iCalendar 0.10 released!:
The last couple of months I've been heavily involved in a cool Zope + Five based project involving calendaring, about which more will be announced shortly. As part of this project I've had the opportunity to improve Five. The project also needed support for the iCalendar RFC, and this lead to me to become the janitor of the awesome Python iCalendar library.
[More]
Mon May 02 2005 16:07 Silva Flexible XML released:
I'm happy to have released today a new Silva extension, Silva Flexible XML. Silva Flexible XML combines a lot of the interests and themes of my technical life in a single package. It's an extension to the Silva CMS that allows the user to create and manage XML content. The important part is XML standards support: the XML content can be configured to be checked by a Relax NG schema or transformed to XHTML using a particular XSLT stylesheet.
[More]
Sun May 15 2005 00:26 lxml 0.6 released:
I've released lxml 0.6. lxml is an alternative, more Pythonic binding for the libxml2 and libxslt XML processing libraries.
[More]
Thu Jun 09 2005 18:29 lxml upcoming new features:
lxml has undergone quite a bit of development since lxml 0.6. While
0.7 is not yet released, this release should be coming soon,
and to whet your appetites here's a partial list of new features:
- XMLSchema validator support
- XInclude support
- more control over namespace prefixes when generating XML
[More]
Wed Jun 15 2005 22:47 lxml 0.7 released!:
I'm happy to announce I've released lxml 0.7 earlier today! It
contains quite a bit of important work, from XInclude and XML Schema support to a better implementation of tostring(). See the changelog for more information.
[More]
Fri Jun 17 2005 10:31 lxml should now compile with gcc 4.0:
Recently I started getting reports that lxml does not compile with gcc 4.0. Investigating this an issue with Pyrex was quickly identified -- it generates C code that is in fact illegal, was accepted by older gcc versions, but gcc 4.0 refuses to.
[More]
(2) Sun Jul 03 2005 11:48 my EuroPython 2005 slides online:
I had a terribly good time at EuroPython 2005. The quality of talks was better than ever, with a nice diverse and big selection. I gave two of them. I also was on two panels, and just shouted out comments through other talks :). If you missed it, you missed quite the event.
[More]
(1) Mon Jul 04 2005 18:45 An open letter to anonymous Network World writers:
Dear anonymous Network World writers claiming to speak for corporate IT executives,
[More]
(1) Wed Jul 13 2005 12:08 extended catalog queries in Zope 3:
Yesterday I managed to build something in just a few hours in Zope 3 that I wouldn't have been able to build so easily in Zope 2. What
I've built is an extended query system for the Zope 3 catalogs.
[More]
Wed Jul 20 2005 23:31 Zope community evaluating JSR-170:
JSR-170 or the Java Content Repository API, appeared on my radar somewhere early in 2004. JSR-170 is interesting to creators of content management systems because it promises a common API for accessing and manipulating CMS content. Implementing this API in a CMS could bring a number of potential benefits to it, such as interoperability, learnability, not reinventing the wheel, and so on. I go deeper into possible reasons for adopting any specification in my previous article Criteria for evaluating specifications.
[More]
(4) Tue Aug 02 2005 17:38 Changing the Python default encoding considered harmful:
Ian Bicking complains about unicode in Python and wants to change the default encoding in his Python application, and wonders why Python makes it so hard to change it.
[More]
(1) Fri Aug 05 2005 11:33 the why of lxml:
Today I read an article about libxslt on O'Reilly's xml.com. It
demonstrates the power of libxslt; it's a cool library. It also
demonstrates why I wrote lxml: writing Python code that correctly
uses libxml2/libxslt's bindings directly is difficult.
[More]
(2) Sat Aug 06 2005 22:11 What is Pythonic?:
What the heck does "pythonic" mean?
[More]
(10) Wed Aug 31 2005 19:26 XML, context and nuance:
Originally this was buried in a comment to an article on Uche's weblog, but he suggested I post it on my own weblog, here goes. The history of this long running discussion is here.
[More]
Tue Sep 06 2005 13:17 Practical experience with Zope 3:
Jeff Shell has posted a very interesting blog entry on his experiences with Zope 3. Here at Infrae we've also been
working with Zope 3 for a few months now and I thought this would be a good opportunity to share some of our experiences.
Fri Sep 09 2005 18:33 hurry library in the Zope 3 base:
Since various people were curious to see especially the little query
language we wrote on top of the Zope 3 catalog, I've just put up the
generic libraries we developed for documentlibrary project online,
at least in svn in the Zope 3 base at codespeak, here:
[More]
Sat Oct 01 2005 13:31 Credit where credit's due:
Thank you Phillip Eby for giving credit where's credit's due in
your comment on this article.
[More]
(16) Tue Oct 04 2005 19:50 Benji York is doing good work:
Benji York, a relatively recent Zope Corporation employee, first
appeared on my "does interesting stuff" radar due to his work with Zope 3 testing: zope.testbrowser, which promises to bring to
Zope 3 testing something I played with before in the context of Silva but never really made very usable: functional testing of the web frontend of code on the server side (utilizing mechanize). Benji's innovation to make this really easy is by integrating it with doctests.
[More]
(2) Fri Oct 07 2005 20:04 Towards a common structure of Zope 3 extensions:
Quite a few Zope 3 extensions are starting to appear. This is great. There is all the great work done within the Z3ECM svn repository. There's Infrae's hurry library of little Zope 3 odds and ends. Then there are various Zope 3 extensions written by Zope corporation, such as zc.catalog and zope.formlib. There's also various work done in the Zope 3 base svn repository.
[More]
(7) Sat Oct 08 2005 15:12 Zope and scaling down:
Ian Bicking posts about what he percieves is a focus of Zope 3 on modeling up-front:
Good development in the beginning means deferring choices as much
as possible and focusing on results instead of abstractions.
Abstractions should emerge from your functional goals, and if you
spend a lot of time modeling in the beginning then you've made
premature choices and designed code that you don't yet understand.
You haven't just wasted time, you've introduced a liability.
[More]
(8) Fri Nov 11 2005 16:41 Tramline source code now available:
At the Plone conference 2005 I gave a lightning talk about tramline,
a lightweight up and download accelator for web applications. Now at
last I've found some time to put the source code online. This is
not a proper release yet, but it's there for interested people to take a look at it.
[More]
(1) Fri Dec 02 2005 19:36 Five-based i18n in Silva checked in (PTS Delenda Est):
Last summer the Five project pulled Zope 3's i18n architecture into the Zope 2 world, thanks to work done by Philipp von Weitershausen, Lennart Regebro and others (please forgive me if I forget someone!).
[More]
(7) Thu Dec 15 2005 13:34 The borderland between content and software:
Paul Everitt writes:
In the early days of Zope, you could design content "TTW" (through
the web). You could answer questions about structure and suddenly,
you had new kinds of content -- YOUR content -- that could be added
to folders in the system. No programmers were involved, no special
login permissions on the server, no database schemas to update.
[More]
(3) Thu Dec 15 2005 22:39 Empowering the power users:
In my last article I talked about the problems that occur on the
borderland between content and software, but didn't give enough
examples. I figured I'd add some more text about this very important
topic.
[More]
Thu Dec 22 2005 18:30 Rails? Hah, we've got Ian Bicking!:
I'm only half joking. Ian, I'm with you: +1
[Main]  | Unless otherwise noted, all content licensed by Martijn Faassen under a Creative Commons License. |