Butterfly is a small PHP 5 framework simplifying the use of XSLT in PHP, specifically to facilitate the use of XSLT in developing web pages. It includes support for chains or sequences of stylesheets, and caches the results of stylesheet translations for fast delivery of result documents. This frees the developer to use XSLT in developing web pages without concern for performance.
XSLT allows you to transform XML documents into other formats, either other XML formats or entirely different text formats. PHP's XSL module enables you to work with XSLT within a PHP application like a web site, but offers no standard solution for working with chains of XSLT stylesheets or for caching the results of XSLT transformations.
Butterfly provides a standard solution to these problems, allowing you to configure XSLT chains and use those chains to produce documents like web pages. Butterfly doesn't consist of a tremendous amount of code, but provides a solution you can just drop into place, rather than figure out all the details yourself while implementing a site based on XSLT.
Inspired by the Apache Cocoon project, a Java Spring framework providing rich XSLT support, Butterfly offers a small subset of Cocoon's functionality in PHP 5.
The code and project are still in nascent form, and ideas and suggestions are welcome. You can view the code on the Butterfly page on Sourceforge
Thanks for visiting.