note 38735 added to function.xslt-error
| From: | mikes at ayeltd dot biz | Date: | Mon, 05 Jan 2004 10:18:35 +0000 |
| Subject: | note 38735 added to function.xslt-error | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-62941@lists.php.net to get a copy of this message | ||
There may be cases where a null $result is legitimate, in this case add a test for non-zero
xlst_errno:
<?php
$xh = xslt_create();
$result = xslt_process($xh, 'dog.xml', 'pets.xsl');
if (!$result && xslt_errno($xh) > 0) {
die(sprintf("Cannot process XSLT document [%d]: %s",
xslt_errno($xh), xslt_error($xh)));
}
echo $result;
xslt_free($xh);
?>
----
Manual Page -- http://www.php.net/manual/en/function.xslt-error.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+38735
Delete -- http://master.php.net/manage/user-notes.php?action=delete+38735&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+38735&report=yes
Search -- http://master.php.net/manage/user-notes.php