Re: xslt_run problems

From: Date: Thu, 18 Jan 2001 15:05:12 +0000
Subject: Re: xslt_run problems
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-35358@lists.php.net to get a copy of this message
> > I am having an issue hopefully someone else has encountered already. I > have successfully compiled the latest expat(0.50) and sablot(1.95.1) > libraries and configured and compiled php4 and apache1.3.14 to use the > Sablotron Extensions. > > I think anyway it was successful because it says "Sablotron XSLT > support - enabled" in a phpinfo page. > > When I try to actually do a transform though, I get this fatal error > that is somewhat confusing: > > Fatal error: msgtype: error in /usr/local/apache/htdocs/index.php on > line 4 > > I have included the code that I am running, and have noticed that I > only get an error when trying to do the transform. In other words, the > xslt_create() line works fine. (qs.xml and qs.xsl exist in the same > directory as the index page) > > CODE: > <? > $parser = xslt_create(); > print "Parser Handle[$parser]"; > xslt_run($parser, './qs.xsl', './qs.xml'); > print "Here is the output:".xslt_fetch_result($parser); > xslt_free($parser); > ?> > > OUPUT: > Parser Handle[Resource id #1] > Fatal error: msgtype: error in /usr/local/apache/htdocs/index.php on > line 4 > > Any help is of course greatly appreciated. > The basic error outputting in sablotron was broken, it means that something is wrong with your XML or XSL file (syntax wise). This has been fixed in CVS, you can upgrade, or a work-around to see what exactly is wrong, is to simply go: function xsl_error($parser, $code, $level, $errors) { echo "Parser: $parser\n<br>\n"; echo "Code: $code\n<br>\n"; echo "Level: $level\n<br>\n"; echo "Errors: \n<br>\n<br>\n"; var_dump($errors); } // initialize parser here xslt_set_error_handler($parser, "xsl_error"); // xslt_run here -sterling

« previous php.general (#35358) next »