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