On Wednesday, March 13, 2002, at 06:13 PM, Edward Tanguay wrote:
> Fatal error: Only variables can be passed by reference in > /home/tanguay/test/testxslt.php on line 7 > > when I run this code: > > <?php > > // Allocate a new XSLT processor > $xh = xslt_create(); > > // Process the document, returning the result into the $result variable > $result = xslt_process($xh, 'content.xml', 'website.xsl'); > I was curious about this, since I just recompiled with XSLT and Sablotron support myself. I read through the annotated manual page for xslt_process(). Have you checked it out? It appears that this extension is still fairly experimental, so the way that the program behaves may differ depending on which version you're running. Which version of PHP are you using, for which OS? Did you compile using the --enable-xslt and --with-xslt-sablot configure parameters? Try some of the workarounds suggested in those annotations, specifically the one which suggests that xslt_process() doesn't like NULL arguments. It'll be ugly, but perhaps you can use implode() to read those files into a string, and get it to work by passing string references rather than filenames. If you really want to use filenames, try using an absolute path, try using ./ before the file names (assuming those files are in the same directory as the script itself). Finally, consider passing a joke array as the 5th and 6th arguments to the function. It may be that in your particular build you need to use workarounds. Be sure to post the results of your experimentation for the benefit of the rest of us. ---- Erik Price Web Developer Temp Media Lab, H.H. Brown [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php