bug53965.phpt 751 B

123456789101112131415161718192021222324252627
  1. --TEST--
  2. Bug #53965 (<xsl:include> cannot find files with relative paths when loaded with "file://")
  3. --SKIPIF--
  4. <?php
  5. if (!extension_loaded('xsl')) die("skip Extension XSL is required\n");
  6. ?>
  7. --FILE--
  8. <?php
  9. $base = 'file://' . dirname(__FILE__) . DIRECTORY_SEPARATOR . '53965';
  10. $xml = new DOMDocument();
  11. $xml->load($base . DIRECTORY_SEPARATOR . 'collection.xml');
  12. $xsl = new DOMDocument();
  13. $xsl->load($base . DIRECTORY_SEPARATOR . 'collection.xsl');
  14. $proc = new XSLTProcessor;
  15. $proc->importStyleSheet($xsl);
  16. echo $proc->transformToXML($xml);
  17. ?>
  18. --EXPECTF--
  19. Hey! Welcome to Nicolas Eliaszewicz's sweet CD collection!
  20. <h1>Fight for your mind</h1><h2>by Ben Harper - 1995</h2><hr>
  21. <h1>Electric Ladyland</h1><h2>by Jimi Hendrix - 1997</h2><hr>