How to debug XSLT Errors?
| From: | Benjamin Walling | Date: | Fri, 28 Mar 2003 17:22:26 +0000 |
| Subject: | How to debug XSLT Errors? | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-141465@lists.php.net to get a copy of this message | ||
I'm trying to use the xslt_* functions, but I can't get any decent error
messages out of them. I've used the XML and XSL I'm passing it in IE, and
it gets processed and transformed correctly. The only error I get is:
Warning: Sablotron error on line 1: XML parser error 4: not well-formed
(invalid token) in C:\Websites\iStatus\test.php on line 16
In the log, I get:
Sablotron Message on line none, level log: Parsing
'http://localhost/Simple.xsl'...
So, I have an error on line 'none'? Can someone show me which line that is?
My XML and XSL is processed correctly by IE, so what gives here? How can I
get it to tell me what it is having a problem with? Without a line number
or some context, there is no way I'll ever debug this!
Using the following code:
$xh = xslt_create();
xslt_set_log($xh, true);
xslt_set_log($xh, getcwd() . '\sablot.log');
$args = array('/_xml' => $xml);
$html = xslt_process($xh, 'arg:/_xml', "http://localhost/Simple.xsl", NULL,
$args);
xslt_free($xh);
echo $html;