ID: 13872 Updated by: derick Reported By: [EMAIL PROTECTED] Old Status: Open Status: Closed Bug Type: XSLT related Operating System: Debian/Linux PHP Version: 4.1.0RC1 Assigned To: derick New Comment:
Ok, another bug bites the dust! Derick Previous Comments: ------------------------------------------------------------------------ [2001-11-13 05:03:48] [EMAIL PROTECTED] Yes, it works, at least for me. No problems with scheme nor sax handlers now. Thanks. Lenar ------------------------------------------------------------------------ [2001-11-13 04:56:10] [EMAIL PROTECTED] This should be fixed in CVS now. Can you try it? (This fix is also applied to the PHP-4.1.0 tree). Derick ------------------------------------------------------------------------ [2001-10-30 13:08:49] [EMAIL PROTECTED] Tried to debug this and found that XSLT_SCHEME(handle).get_all for example doesn't get set so it returns at the start of scheme_getall function (sablot.c) without doing anything useful. The same error appears with xslt_set_sax_handlers when using handler type which needs handler pair (element, document). Seems that register_sax_handler_pair() doesn't work the way it should. I don't fully understand how the code works so I do not know why exactly this fails. But I hope you got better starting point now. ------------------------------------------------------------------------ [2001-10-30 10:33:44] [EMAIL PROTECTED] Can't get scheme handler to work. Seems it gets never called. Instead I get: Sablotron error on line 1: unknown encoding '' Example script: <?php function scheme_handler($xslt, $scheme, $rest) { echo "*"; return '<?xml version="1.0" encoding="UTF-8"?><doc>fish</doc>'; } $xslt = xslt_create(); xslt_set_scheme_handlers($xslt, array("get_all" => "scheme_handler")); $args = array( "/_xml" => '<?xml version="1.0" encoding="UTF-8"?><test>TestValue</test>', "/_xsl" => '<?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:template match="test"> <xsl:value-of select="."/>: <xsl:value-of select="document('. "'test:/val'" .')/doc"/> </xsl:template> </xsl:stylesheet>' ); $data = xslt_process($xslt, "arg:/_xml", "arg:/_xsl", NULL, $args); // expect: TestValue: fish echo $data; xslt_free($xslt); ?> ------------------------------------------------------------------------ Edit this bug report at http://bugs.php.net/?id=13872&edit=1 -- PHP Development Mailing List <http://www.php.net/> To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]