xref: /PHP-8.3/ext/xsl/tests/xslt002.phpt (revision 8567bc10)
1--TEST--
2Test 2: Transform To HTML String
3--EXTENSIONS--
4xsl
5--FILE--
6<?php
7echo "Test 2: Transform To HTML String";
8include("prepare.inc");
9// changing output method to html
10$xp = new domxpath($xsl);
11$res = $xp->query("/xsl:stylesheet/xsl:output/@method");
12if ($res->length != 1) {
13    print "No or more than one xsl:output/@method found";
14    exit;
15}
16$res->item(0)->value = "html";
17$proc->importStylesheet($xsl);
18print "\n";
19print $proc->transformToXml($dom);
20print "\n";
21--EXPECT--
22Test 2: Transform To HTML String
23<html><body>bar
24a1 b1 c1 <br>
25a2 c2 <br>
26�3 b3 c3 <br>
27</body></html>
28