Annotation of embedaddon/php/ext/xsl/tests/bug26384.phpt, revision 1.1.1.1
1.1 misho 1: --TEST--
2: Bug #26384 (domxslt->process causes segfault with xsl:key)
3: --SKIPIF--
4: <?php require_once dirname(__FILE__) .'/skipif.inc'; ?>
5: --FILE--
6: <?php
7: $dom = new domDocument;
8: $dom->load(dirname(__FILE__)."/area_name.xml");
9: if(!$dom) {
10: echo "Error while parsing the document\n";
11: exit;
12: }
13: $xsl = new domDocument;
14: $xsl->load(dirname(__FILE__)."/area_list.xsl");
15: if(!$xsl) {
16: echo "Error while parsing the document\n";
17: exit;
18: }
19: $proc = new xsltprocessor;
20: if(!$proc) {
21: echo "Error while making xsltprocessor object\n";
22: exit;
23: }
24:
25: $proc->importStylesheet($xsl);
26: print $proc->transformToXml($dom);
27:
28: //this segfaulted before
29: print $dom->documentElement->firstChild->nextSibling->nodeName;
30:
31: --EXPECT--
32: HERE
33: ROW
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>