<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.7 $ -->
<!-- splitted from ./en/functions/xslt.xml, last change in rev 1.3 -->
  <refentry id="function.xslt-error">
   <refnamediv>
    <refname>xslt_error</refname>
    <refpurpose>Returns an error string</refpurpose>
   </refnamediv>
   <refsect1>
    <title>Description</title>
     <methodsynopsis>
      <type>mixed</type><methodname>xslt_error</methodname>
       <methodparam><type>resource</type><parameter>xh</parameter></methodparam>
     </methodsynopsis>
    <para>
     Returns a string describing the last error that occurred on the 
     passed XSLT processor.
    </para>
   </refsect1>
   <refsect1>
    &reftitle.examples;
    <example>
     <title>
      Handling errors using the <function>xslt_error</function> and 
      <function>xslt_errno</function> functions.
     </title>
     <programlisting role="php">
<![CDATA[
<?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);
?>
]]>
     </programlisting>
    </example>
   </refsect1>
   <refsect1>
    &reftitle.seealso;
    <para>
     <function>xslt_errno</function>.
    </para>
   </refsect1>
  </refentry>

<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"../../../../manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->