PHP 4.0 Bug #8895: xslt_process() documentation problem
| From: | php-bugs at improbable dot org | Date: | Thu, 25 Jan 2001 07:02:18 +0000 |
| Subject: | PHP 4.0 Bug #8895: xslt_process() documentation problem | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-44957@lists.php.net to get a copy of this message | ||
From: php-bugs@improbable.org
Operating system: Linux (Debian 2.2r2)
PHP version: 4.0.4pl1
PHP Bug Type: Sablotron XSL
Bug description: xslt_process() documentation problem
According to the documentation xslt_process() is supposed to return false and allow you to check
errors with xslt_errno() & xslt_error().
I found several situations where a validation error in the XSL stylesheet would cause it to instead
fail with a fatal error:
PHP Fatal error: msgtype: error
in /var/www/stone2/index.php on line 18
(One example of an error would be a HTML tag with unquoted parameters (e.g. BORDER=0), which is
legal for numeric values in HTML but not XML)
Needless to say, this made debugging rather tricky as it never reached the error display in my code:
if (xslt_process($XSL, $XML, $result)) {
echo $result;
} else {
echo '<P>XSL transformation error: </P>';
echo xslt_errno() . ': ' . xslt_error();
}
PHP config info:
PHP Version 4.0.4pl1
System Linux gigante 2.2.18pre21 #1 Sat Nov 18 18:47:15 EST 2000 i686
unknown
Build Date Jan 24 2001
Configure Command './configure' '--with-apxs' '--enable-shared'
'--with-bz2' '--with-java=/usr/local/jdk1.3' '--with-gettext'
'--with-mcrypt' '--with-zlib' '--with-openssl=/usr/local/ssl'
'--enable-magic-quotes' '--enable-calendar' '--with-curl'
'--with-mcrypt' '--with-dom=/usr/local/lib' '--enable-ftp'
'--enable-gd-imgstrttf' '--with-gd' '--with-jpeg-dir'
'--with-ttf'
'--with-t1lib' '--with-imap-ssl' '--with-imap'
'--with-ldap'
'--with-mysql' '--with-pdflib=/usr/local/lib' '--with-zlib-dir'
'--with-jpeg-dir' '--with-png-dir' '--with-tiff-dir'
'--with-pgsql'
'--with-pspell' '--with-readline' '--with-sablot'
'--with-sablot-errors-descriptive' '--enable-trans-sid'
'--enable-shmop' '--enable-sockets' '--with-swf'
'--enable-sysvsem'
'--enable-sysvshm' '--enable-inline-optimization'
'--enable-memory-limit'
--
Edit Bug report at: http://bugs.php.net/?id=8895&edit=1