ID: 11194 User Update by: [EMAIL PROTECTED] Status: Open Bug Type: Sablotron XSL Operating system: Linux PHP Version: 4.0.5 Description: Sablotron bug An upgrade to Sablotron 0.60 _seems_ to fix the problem. So I think it was an issue with Sablotron, not with PHP. Previous Comments: --------------------------------------------------------------------------- [2001-05-30 18:28:16] [EMAIL PROTECTED] Sorry, this is a XSL that results in the problem, the previous one doesn't: --==[ begin ]==-- <?xml version="1.0" encoding="utf-8"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:output method="html" indent="yes" encoding="utf-8" /> <xsl:template name="index"> <xsl:param name="title"></xsl:param> <xsl:param name="page"></xsl:param> <xsl:text> <html> </html> </xsl:text> </xsl:template> <xsl:template name="login"> <xsl:text> <html> <head> <title>iBBS - <xsl:value-of select="$title"/></title> <link href="css/sa_00.css" rel="stylesheet" type="text/css"/> </head> <body> </table> </body> </html> </xsl:text> </xsl:template> </xsl:stylesheet> --==[ end ]==-- --------------------------------------------------------------------------- [2001-05-30 18:25:07] [EMAIL PROTECTED] Here some example files that can reproduce the problem: --==[ test.php ]==-- <?php // include the XSL-file $xsl_file = "test.html.xsl"; // create a new domxml-object $doc = new_xmldoc("1.0"); $root = $doc->add_root("HTML"); $head = $root->new_child("HEAD", ""); $head->new_child("TITLE", "Here a title"); // Create a new processor handle $th = @xslt_create() or die("Can't create XSLT handle!"); // Open the XML and XSL files $sh = fopen($xsl_file, "r") or die("Can't open XSL file"); // Read in the XML and XSL contents $xslContent = fread($sh, filesize($xsl_file)); // Perform the XSL transformation xslt_process($xslContent, $doc->dumpmem(), $XSLtransformation); // Output the transformed XML file echo $XSLtransformation; // Free up the resources xslt_free($th); ?> --==[ test.html.xsl ]==-- <?xml version="1.0" encoding="utf-8"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:output method="html" indent="yes" encoding="utf-8" /> <xsl:template name="harry"> <xsl:param name="title"></xsl:param> <xsl:param name="page"></xsl:param> <xsl:text> <html> </table> </html> </xsl:text> </xsl:template> </xsl:stylesheet> --==[ The End ]==-- I know the xslt doesn't do anything but I stripped a very long file to the part that reproduces the problem :) --------------------------------------------------------------------------- [2001-05-30 17:50:19] [EMAIL PROTECTED] Nope, PHP 4.06RC1 does not fix the problem.. --------------------------------------------------------------------------- [2001-05-30 11:24:04] [EMAIL PROTECTED] Does this happen with PHP 4.0.6RC1: http://www.php.net/~andi/php-4.0.6RC1.tar.gz --------------------------------------------------------------------------- [2001-05-30 09:08:33] [EMAIL PROTECTED] The Sablotron PHP implementation works quite well. However if you offer Sablotron a buggy XSLT, that child of Apache produces an error (that's great ;). But.. in future instances it always produces an error as well: Error: duplicate tag name:... I think the reason is that Sablot's buffer is not flushed when an error occurs in Sablot. The tag nam only exists one time in the XSL. If the buffer is not-empty, that would explain the above error. --------------------------------------------------------------------------- The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online. Full Bug description available at: http://bugs.php.net/?id=11194 -- 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]