protected function canonicalize($xml)
    {
        $xml = str_replace('<?xml version="1.0" encoding="UTF-8"?>', null, $xml);

        $replacement = 'xmlns="http://www.modirum.com/schemas" ';
        $start  = 0;
        $length = 9;

        $xml = substr($xml, $start, $length)
             . substr_replace($xml, $replacement, $start, $length);

        $dom = new \DOMDocument("1.0", "utf-8");
        $dom->loadXML($xml);
        $xml = $dom->C14N();

        return $xml;
    }