[wp-hackers] Shared Knowledge for Developers

Jacob Santos dragonwing at dragonu.net
Thu Sep 6 00:01:00 GMT 2007

Sweet! Thanks.

That would have worked great, but it is too bad I've abandoned the code 
or I would probably have tried this method.

Jacob Santos

Stephane Daury wrote:
> On Sep 05, 2007, at 13:10, Computer Guru wrote:
>>> PHP 5 XSLT doesn't seem to like for PHP in the XML file, and if you can
>>> fix this problem, then please I would like to see the code.
> Note the code below is assuming you mean the PHP5/libxslt-based XSL 
> features (not the older Sablotron-based ones)
> http://www.php.net/manual/en/ref.xsl.php
> That's because the XML is not pre-processed when loaded through 
> DOMDocument (before being forked off to XSLTProcessor).
> The only way to process an XML file with PHP in it (that I know of) is 
> to use DOMDocument->loadXML() coupled with a file_get_contents() call 
> on a URL, instead of DOMDocument->load() on a local file. That forces 
> it to pass though httpd+php and your XSLT process therefore only gets 
> the rendered output.
> This said, it's obviously not the best performance, but I've used it 
> once in the past and coupled with caching, it's not bad at all when 
> you benchmark it against a similar DB query or so.
> Stephane
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers

More information about the wp-hackers mailing list