[Zopexmlmethods-devel] Re: Zope3 XML sprint
Brought to you by:
arielpartners,
philikon
From: Philipp v. W. <ph...@we...> - 2003-04-12 10:13:33
|
Hi, > > You should look what we did for XML in Zope3 just these past days during > > the sprint. It's amazing and will make things like XSLT really easy... > > I am sorry I missed that! What did you > guys do? Where can I get more information? We basically hooked up XML to Zope3's Component Architecture. Like Zope3 schemas, XML Schemas can be used to describe a certain content type (in this case an XML content type). They can be used in exchange for normal Python interfaces almost everywhere. We implemented a very simple XML Document content object which parses the XML and looks for schema declarations. If it finds any, it will automatically change its __implements__ so it will implement it. You can then for example define a special view for that XML Schema and you will be able to use that view on the content object. You'll find a little more information in zope/app/xml/README.txt (http://cvs.zope.org/Zope3/src/zope/app/xml/README.txt?rev=HEAD) and examples in zopeproducts/xml_examples (http://cvs.zope.org/zopeproducts/xml_examples/). We also implemented very simple XSLT support (in a separate product, however). XSLT sheets in the Zope3 sense are adapters that adapt from one schema to another. We first implemented a XSLT processor utility based on the 4Suite library (can be replaced by a different utility implementing the same interface). The unit test actually declares an adapter from one XML schema to another and uses an XSLT sheet for it and it works. We just didn't get it to work in reality (outside the unit test). Must be a very small problem, but we ran out of time yesterday evening. I am sure the XLST product including examples will be checked in the next days or so... Philipp |