You are not logged in Log in Join
You are here: Home » Members » arielpartners » XML Transform

Log in



Folder icon XML Transform

ZopeXMLMethods is the successor project to XMLTransform, which is still available but no longer maintained. You might want to look there instead...
XMLTransform enables Zope users to associate an XSLT transformer with an XML document that automatically renders the result of the transformation when called. It can behave like either a Page Template or a DTML Method. There are no constraints on the type of Zope objects used for the XML or XSLT. In fact, the content may cobbled together from multiple sources, as long as the final content may be obtained as well-formed XML from a single object for each.
The XMLTransform product adds three separate objects to the "Add" menu in the Zope Management Interface:
  • XML Transform
  • XML Transform Cache Manager
  • XML Transform Registry
XMLTransform features a pluggable architecture that makes it possible to dynamically choose between different XSLT Processors at runtime. It currently works with any of the following combinations:
  • PyXML 0.66 and 4Suite 0.11.1
  • PyXML 0.7.1 and 4Suite 0.12.a3
  • libxml2 2.4.26 and libxslt 1.0.22 (Python bindings)
  • Pyana 0.6
  • Sablotron 0.96 and Sab-Pyth 0.52
(See README for more details).
An XMLTransform is a Zope object that links an XML document to a desired XSLT script. The XMLTransform automatically runs the XSLT transformation and renders the results when accessed through DTML or page templates.
An XMLTransform object contains neither the XML source document nor the XSLT transformer. Instead, it obtains each of them from two separate Zope objects, whose IDs are recorded as properties. In this way, an XMLTransform object represents an association between an XML document and a transformer.
This feature differentiates XMLTransform from other XML/XSLT-based Zope products, in that it recognizes the fact that there is often a many to many relationship between XML documents and XSLT transformers.
The XML source pointed to by an XMLTransform can come from anywhere, for example:
  • Content retrieved from an SQL database and converted to XML format
  • A DTMLDocument that is an XML file, with portions grabbed from other objects via DTML tags.
  • An XMLFile instance (XMLFile is part of the XMLKit Zope product)
  • CVSFile object that points to an external XML document in a CVS repository (CVSFile is part of the CVSFile Zope product)
The only requirement is that Zope object from which XMLTransform obtains the XSLT source must support the __call__() method, and that the resulting XML must be well-formed.
Unfortunately, two well-known Zope products do not support the __call__() method
We expect to add the capability to specify an alternate method (for example, __str__() would work in both cases above) to call in a future release of XMLTransform.
In this way, XMLTransform can be used to form "pipelines," where the output of one object becomes the input of the next. This approach is more modular: each kind of object performs only one task, and can be tested and/or replaced on an individual basis.

 Title   Type   Size   Modified   Status 
 Changes Edit object Document 9 K 2002-11-08 published
 Installation Notes Edit object Document 1 K 2002-08-27 published
 License Edit object Document 3 K 2002-08-27 published
 Release Information Edit object Document 28 K 2002-12-09 published
 Todo List Edit object Document 5 K 2002-11-08 published
 Tutorial Edit object Document 15 K 2002-11-01 published
 XML Transform 0.8 Edit object Software Release   2002-08-27 published
 XML Transform 0.9 Edit object Software Release   2002-11-01 published
 XMLTransform 0.9.1 Edit object Software Release   2002-11-08 published