PhpRiot
Become Zend Certified

Prepare for the ZCE exam using our quizzes (web or iPad/iPhone). More info...


When you're ready get 7.5% off your exam voucher using voucher CJQNOV23 at the Zend Store

xslt_error

(PHP 4 >= 4.0.3)

xslt_errorReturns an error string

Description

string xslt_error ( resource $xh )

Returns a string describing the last error that occurred on the passed XSLT processor.

Parameters

xh

The XSLT processor link identifier, created with xslt_create().

Return Values

Returns the error message, as a string.

Examples

Example #1 Handling errors using the xslt_error() and xslt_errno() functions.

<?php

$xh 
xslt_create();
$result xslt_process($xh'dog.xml''pets.xsl');
if (!
$result) {
    die(
sprintf("Cannot process XSLT document [%d]: %s",
                
xslt_errno($xh), xslt_error($xh)));
}

echo 
$result;

xslt_free($xh);
?>

See Also

PHP Manual