public function extractTranslationKeys(): \Generator
    {
        /** @var \DOMNodeList $tmp */
        $transUnits = $this->getXPath()->query('/xlf:xliff/xlf:file/xlf:body/xlf:trans-unit');

        if ($transUnits->length > 0) {
            /** @var \DOMElement $element */
            foreach ($transUnits as $element) {
                if ('' === $key = $element->getAttributeNS(self::XLIFF_NS, 'id')) {
                    throw new \RuntimeException('Empty Id: ' . var_export($element, true));
                }
                yield $key;
            }
        }
    }