bug53965.phpt 668 B

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