bug26384.phpt 642 B

123456789101112131415161718192021222324252627282930313233
  1. --TEST--
  2. Bug #26384 (domxslt->process causes segfault with xsl:key)
  3. --EXTENSIONS--
  4. xsl
  5. --FILE--
  6. <?php
  7. $dom = new domDocument;
  8. $dom->load(__DIR__."/area_name.xml");
  9. if(!$dom) {
  10. echo "Error while parsing the document\n";
  11. exit;
  12. }
  13. $xsl = new domDocument;
  14. $xsl->load(__DIR__."/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. $proc->importStylesheet($xsl);
  25. print $proc->transformToXml($dom);
  26. //this segfaulted before
  27. print $dom->documentElement->firstChild->nextSibling->nodeName;
  28. ?>
  29. --EXPECT--
  30. HERE
  31. ROW