ID: 22137 User updated by: [EMAIL PROTECTED] Reported By: [EMAIL PROTECTED] -Status: Feedback +Status: Open Bug Type: XSLT related Operating System: Linux PHP Version: 4.3.0 New Comment:
Thanks for your reply. I made a script to reproduce the problem. On php version 4.2.1 on windows it works fine. On php version 4.3.0 on linux it will hang. With kind regards, Paul van Gils <?php $xml="<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?>". "<articlelist>". "<articles>". "<article>". "<text1>Hello world!</text1>". "<number></number>". "</article>". "</articles>". "</articlelist>"; $xsl="<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?>\n". "<xsl:stylesheet version=\"1.0\"\n". "xmlns:xsl=\"http://www.w3.org/1999/XSL/Transform\"\n". "xmlns:fo=\"http://www.w3.org/1999/XSL/Format\">\n". "<xsl:output method=\"html\"/>\n". "<xsl:template match=\"/\">\n". "<table width='100%' border='0' cellpadding='0' cellspacing='0'>\n". "<xsl:for-each select=\"articlelist/articles/article\">\n". "<xsl:sort select=\"number\"/>\n". "<tr>\n". "<td valign='top'>\n". "Hello world!\n". "</td>\n". "</tr>\n". "</xsl:for-each>\n". "</table>\n". "</xsl:template>\n". "</xsl:stylesheet>\n"; // $xml and $xsl contain the XML and XSL data $arguments = array( '/_xml' => $xml, '/_xsl' => $xsl ); // Allocate a new XSLT processor $xh = xslt_create(); $result = xslt_process($xh, 'arg:/_xml', 'arg:/_xsl', NULL, $arguments); echo "<html><body>Gereed</body></html>"; ?> Previous Comments: ------------------------------------------------------------------------ [2003-02-09 16:24:43] [EMAIL PROTECTED] Is this reproducable with sabcmd? If not, please provide sample files. If they're long, post a url where they can be downloaded. ------------------------------------------------------------------------ [2003-02-09 07:50:56] [EMAIL PROTECTED] I used <xsl: sort select="number"> in my xsl file. I used an empty tag <number></number> in my xml file. I understand that sorting on an empty xml tag is very difficult but i didn't expect the xslt_process function to hang. Of course where <number></number> is filled in everything works fine. It should be better to give an error or place the empty tags in the beginning or in the end. Hangup cost server performance i think. With kind regards, Paul van Gils ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=22137&edit=1