XSLT parsing causes "passed by reference" error
| From: | Edward Tanguay | Date: | Wed, 13 Mar 2002 23:13:37 +0000 |
| Subject: | XSLT parsing causes "passed by reference" error | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-88405@lists.php.net to get a copy of this message | ||
I get the error:
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');
if ($result) {
print "SUCCESS, sample.xml was transformed by sample.xsl into the
\$result";
print " variable, the \$result variable has the following
contents\n<br>\n";
print "<pre>\n";
print $result;
print "</pre>\n";
}
else {
print "Sorry, sample.xml could not be transformed by sample.xsl into";
print " the \$result variable the reason is that " . xslt_error($xh) .
print " and the error code is " . xslt_errno($xh);
}
xslt_free($xh);
?>
Can anyone tell me why? Is this a problem with the parser or some other
problem.
I am new to the XSLT functions.
Thanks,
Edward