The Server Pages
:: TSP Menu
- Home
- Authors
- Glossary
- RSS Feed

:: Servers
- CPanel
- Hosting
- Linux
- Windows

:: Webmaster
- Databases
- Design
- Search Engines

:: Scripts
- Scripts

:: Documentation
- PHP Manual

:: Other
- Errors & Solutions
- TechPunt
- Wojjie

search for in the

xslt_set_object> <xslt_set_error_handler
[edit] Last updated: Sat, 12 May 2012

view this page in


(PHP 4 >= 4.0.6)

xslt_set_logSet the log file to write log messages to


void xslt_set_log ( resource $xh [, mixed $log ] )

This function allows you to set the file in which you want XSLT log messages to, XSLT log messages are different than error messages, in that log messages are not actually error messages but rather messages related to the state of the XSLT processor. They are useful for debugging XSLT, when something goes wrong.

By default logging is disabled, in order to enable logging you must first call xslt_set_log() with a boolean parameter which enables logging, then if you want to set the log file to debug to, you must then pass it a string containing the filename.



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


This parameter is either a boolean value which toggles logging on and off, or a string containing the logfile in which log errors too.

Return Values

No value is returned.



Please note that file:// is needed in front of the path when using Windows.


Example #1 Using the XSLT Logging features


xslt_set_log($xhgetcwd() . '/myfile.log');

$result xslt_process($xh'dog.xml''pets.xsl');


add a note add a note User Contributed Notes xslt_set_log
nospam at phppatterns dot com 06-Apr-2003 08:50
With PHP 4.3.1, Sablotron 0.97 on Windows you do not need the 'file://' prepend to specify a log file but the full system path is required.

show source | credits | sitemap | contact | advertising | mirror sites