Re: How to debug XSLT Errors?
| From: | Ray Hunter | Date: | Fri, 28 Mar 2003 18:51:14 +0000 |
| Subject: | Re: How to debug XSLT Errors? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-141477@lists.php.net to get a copy of this message | ||
Try using the command line sablot "sabcmd" to parse the xsl file and see
if you can get any info on the well-formness of the file. If you dont
have the command line version I suggest downloading an application that
does xsl verification.
You could also send post the file so that we can review the xsl code.
--
Ray
On Fri, 2003-03-28 at 10:22, Benjamin Walling wrote:
> 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;
>
>