1--TEST--
2Test: Canonicalization with special nodes
3--EXTENSIONS--
4dom
5--FILE--
6<?php
7$xml = <<<EOXML
8<?xml version="1.0"?>
9<!DOCTYPE doc [
10]>
11<doc xmlns="">
12    <![CDATA[bar]]>
13    <!-- x -->
14    <temp xmlns=""/>
15    <?pi-no-data          ?>
16</doc>
17EOXML;
18
19$dom = new DOMDocument();
20$dom->loadXML($xml);
21$doc = $dom->documentElement;
22echo $doc->C14N(withComments: true);
23echo $doc->C14N(withComments: false);
24
25?>
26--EXPECT--
27<doc>
28    bar
29    <!-- x -->
30    <temp></temp>
31    <?pi-no-data?>
32</doc><doc>
33    bar
34
35    <temp></temp>
36    <?pi-no-data?>
37</doc>
38