--TEST--
Test: Canonicalization - C14N() with references
--EXTENSIONS--
dom
--FILE--
EOXML;
$dom = new DOMDocument();
$dom->loadXML($xml);
$doc = $dom->documentElement->firstChild;
$xpath = [
'query' => '(//a:contain | //a:bar | .//namespace::*)',
'namespaces' => ['a' => 'http://www.example.com/ns/foo'],
];
$prefixes = ['test'];
foreach ($xpath['namespaces'] as $k => &$v);
unset($v);
foreach ($xpath as $k => &$v);
unset($v);
foreach ($prefixes as $k => &$v);
unset($v);
echo $doc->C14N(true, false, $xpath, $prefixes);
?>
--EXPECT--