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

Log in
Name

Password

 
 

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.

Latest Release: 0.9.1
Last Updated: 2002-11-08 16:47:03
Author: ZopeOrgSite
Categories: Content Object, Developer, Examples, External Access
Maturity: Stable

Available Releases

Version Maturity Platform Released
0.9.1 Stable   2002-11-08 16:47:03
  XMLTransform-0-9-1.tgz (65 K) All md5
0.9 Stable   2002-11-01 03:07:23
  XMLTransform-0-9-0.tgz (62 K) All md5
0.8 Stable   2002-08-27 20:55:56
  XMLTransform-0-8-0.tgz (62 K) All md5