xslt005.phpt 580 B

1234567891011121314151617181920212223242526272829
  1. --TEST--
  2. Test 5: Checking Indent
  3. --EXTENSIONS--
  4. xsl
  5. --FILE--
  6. <?php
  7. echo "Test 5: Checking Indent";
  8. include("prepare.inc");
  9. $xp = new domxpath($xsl);
  10. $res = $xp->query("/xsl:stylesheet/xsl:output/@indent");
  11. if ($res->length != 1) {
  12. print "No or more than one xsl:output/@indent found";
  13. exit;
  14. }
  15. $res->item(0)->value = "yes";
  16. $proc->importStylesheet($xsl);
  17. print "\n";
  18. print $proc->transformToXml($dom);
  19. print "\n";
  20. --EXPECT--
  21. Test 5: Checking Indent
  22. <?xml version="1.0" encoding="iso-8859-1"?>
  23. <html>
  24. <body>bar
  25. a1 b1 c1 <br/>
  26. a2 c2 <br/>
  27. ä3 b3 c3 <br/>
  28. </body>
  29. </html>