Ah, yes.... there isn't a decent XQuery engine for Python. Generally if you're using a XML database, the XML database supports XQuery. So you put together your XQuery, send it to the XML database, get back XML (maybe read it to XML nodes with ElementTree or lxml), then do what you will with it.
This is my desire at least. I plan on going with the community version of the Mark Logic XML db (http://marklogic.com/) but there's a Berkeley DB XML engine that I've heard is decent as well (http://sleepycat.com/products/bdbxml.html). Both of these use XQuery for their searching, and thus you can get your resulting XML back in a way that requires very little if any changes before you're ready to use it in your webapp. The Mark Logic one has super-powerful search and indexing capabilities though which makes it more of a fit for my projects. Regarding XSLT and XPath, I believe lxml does give you full 100% XPath 1.0 and XSLT because it uses libxml2 and libxslt. The functionality comes at the direct con that you have to have those two libraries on the system to use lxml. Other than that, lxml has a mostly identical interface with ElementTree. Back to the original issue of a "XML Model". If you use a XML database, the issue is gone afaik. Because you just keep the XML doc as XML in your XML database. There's no need to define a 'model', using Berkeley DB XML, you can of course restrict the database to holding XML docs that meet certain XML DTD's (a DTD or Schema *is* the 'Model' for XML, no?). If the purpose's main intent was to have a better way to deal with XML rather than ElementTree or DOM stuff, perhaps we should be inspired by the Ruby answer to XML? Rather than using clunky DOM access, they made it more 'Ruby-like' (http://www.germane-software.com/software/rexml/). Perhaps something like that so making a Python class on top of various XML structures isn't needed, and instead we can just use the existing XML structures in a better way? Cheers, Ben --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "TurboGears" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/turbogears -~----------~----~----~----~------~----~------~--~---

