Use Mercurial to pull the latest from here:
http://hg.4suite.org/amara/trunk/
You can try out Amara 2 without mucking with your Amara 1.x installation
using virtualenv.
http://pypi.python.org/pypi/virtualenv
I have a few notes here. See the "Test sandbox" heading:
http://wiki.xml3k.org/Amara2/Developer_notes
Here is a small test session:
--%<--
from itertools import *
from amara.xpath.parser import parse as xpathparse
from amara.xpath import context as xpathcontext
from amara.domlette import NonvalParse
from amara.lib import inputsource
XML = ''.join(chain(['<a><b>'], [ '<c/>' for i in xrange(5000) ],
['</b></a>']))
doc = NonvalParse(inputsource(XML), 'urn:bogus')
ctx = xpathcontext(doc)
print xpathparse('a').evaluate(ctx)
print len(xpathparse('//c').evaluate(ctx))
--%<--
Yes "amara.domlette.NonvalParse" is the legacy name. It will change.
There is still some legacy sprinkled about.
Also, there are still a lot of debug statements for XPath. You can
disable the debugging by commenting out the define in
amara/src/expat/debug.h:
#define DEBUG_ALL
You can already see much of the performance improvements for Amara 2.x.
--
Uche Ogbuji http://uche.ogbuji.net
Founding Partner, Zepheira http://zepheira.com
Linked-in profile: http://www.linkedin.com/in/ ucheogbuji
Articles: http://uche.ogbuji.net/tech/publications/