cvs: php-src /ext/xsl/tests area_list.xsl area_name.xml bug26384.phpt

From: Date: Sat, 29 Nov 2003 16:38:09 +0000
Subject: cvs: php-src /ext/xsl/tests area_list.xsl area_name.xml bug26384.phpt
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-24747@lists.php.net to get a copy of this message
chregu Sat Nov 29 11:38:09 2003 EDT Added files: /php-src/ext/xsl/tests area_list.xsl area_name.xml bug26384.phpt Log: testcase for bug26384 Index: php-src/ext/xsl/tests/area_list.xsl +++ php-src/ext/xsl/tests/area_list.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="text" encoding="UTF-8"/> <xsl:key name="area" match="ROW" use="substring(translate(AREA_NAME, '&quot;', ''), 1, 1)"/> <xsl:template match="*"> HERE </xsl:template> </xsl:stylesheet> Index: php-src/ext/xsl/tests/area_name.xml +++ php-src/ext/xsl/tests/area_name.xml <?xml version="1.0" encoding="UTF-8"?> <AREA_NAME> <ROW> <AREA_CODE>13</AREA_CODE> <AREA_NAME>&quot;Автово&quot; м.</AREA_NAME> <AREA_NAME_ENG>m.&quot;Avtovo&quot;</AREA_NAME_ENG> </ROW> </AREA_NAME> Index: php-src/ext/xsl/tests/bug26384.phpt +++ php-src/ext/xsl/tests/bug26384.phpt --TEST-- Bug #26384 (domxslt->process causes segfault with xsl:key) --SKIPIF-- <?php require_once('skipif.inc'); ?> --FILE-- <?php $dom = new domDocument; $dom->load(dirname(__FILE__)."/area_name.xml"); if(!$dom) { echo "Error while parsing the document\n"; exit; } $xsl = new domDocument; $xsl->load(dirname(__FILE__)."/area_list.xsl"); if(!$xsl) { echo "Error while parsing the document\n"; exit; } $proc = new xsltprocessor; if(!$proc) { echo "Error while making xsltprocessor object\n"; exit; } $proc->importStylesheet($xsl); print $proc->transformToXml($dom); //this segfaulted before print $dom->documentElement->firstChild->nextSibling->nodeName; --EXPECT-- HERE ROW

« previous php.cvs (#24747) next »