XSL Cache by The New York Times
Filed in
Computers
Tags: cache, nytimes, php, xml, xsl cache
The XSL Cache extension is a mod of PHP’s XSL extension developed by the NYTimes. This extension caches the parsed XSL stylesheet representation in sites that constantly the same transform is applied. The code is already working with a few applications on the New York Times’ website.
The installation is very easy. Just run the following commands:
phpize ./configure --with-xslcache=–with-xsl-exsl-dir=</path><path to libexslt> make sudo make install </path>
Then you have only to add the line extension=xslcache.so to php.ini file and restart the web server. I’ve been doing some tests with XSL Cache and I got good results. The following code shows how to load a stylesheet and then use it to transform a parsed XML document:
<?php $xsltpath = '/home/harrisj/example.xsl'; $xslt = new xsltCache; $xslt->importStyleSheet($xsltpath); $xml = DOMDocument::loadXML($source_doc); print $xslt->transformToXML($xml); ?>

Link | XSL Cache Project





