From:             sparky_industries at mad dot scientist dot com
Operating system: Windows 98
PHP version:      4.3.3
PHP Bug Type:     XSLT related
Bug description:  xsl:sort with data-type='text' ... php crashes

Description:
------------
if i want to xsl:sort the elements of xsl:for-each and set data-type to
'text' (or drop data-type, which is the same), php crashes (windows
error-popup)!

Reproduce code:
---------------
XML:
<?xml version="1.0" encoding="UTF-8"?>
<root>
   <names>
      <name>hansi</name>
      <name>bergi</name>
      <name>krabi</name>
      <name>tali</name>
   </names>
</root>

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="/root">
        <xsl:apply-templates select="names" />
</xsl:template>

<xsl:template match="names">
        <xsl:for-each select="name">
                <xsl:sort select="." order="descending" data-type="text" />
                <xsl:value-of select="." />
                <br />
        </xsl:for-each>
</xsl:template>

</xsl:stylesheet>

Expected result:
----------------
tali<br />
krabi<br />
hansi<br />
bergi<br />




Actual result:
--------------
PHP crashes ...

if i exclude the xsl:sort instruction, it works !

it also works, when data-type="number" (this makes no sense here), but if
i drop it, or set data-type="text" php crashes

-- 
Edit bug report at http://bugs.php.net/?id=25644&edit=1
-- 
Try a CVS snapshot (php4):  http://bugs.php.net/fix.php?id=25644&r=trysnapshot4
Try a CVS snapshot (php5):  http://bugs.php.net/fix.php?id=25644&r=trysnapshot5
Fixed in CVS:               http://bugs.php.net/fix.php?id=25644&r=fixedcvs
Fixed in release:           http://bugs.php.net/fix.php?id=25644&r=alreadyfixed
Need backtrace:             http://bugs.php.net/fix.php?id=25644&r=needtrace
Try newer version:          http://bugs.php.net/fix.php?id=25644&r=oldversion
Not developer issue:        http://bugs.php.net/fix.php?id=25644&r=support
Expected behavior:          http://bugs.php.net/fix.php?id=25644&r=notwrong
Not enough info:            http://bugs.php.net/fix.php?id=25644&r=notenoughinfo
Submitted twice:            http://bugs.php.net/fix.php?id=25644&r=submittedtwice
register_globals:           http://bugs.php.net/fix.php?id=25644&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=25644&r=php3
Daylight Savings:           http://bugs.php.net/fix.php?id=25644&r=dst
IIS Stability:              http://bugs.php.net/fix.php?id=25644&r=isapi
Install GNU Sed:            http://bugs.php.net/fix.php?id=25644&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=25644&r=float

Reply via email to