public function createTranslationUnit(string $identifier, string $sourceValue = null): XmlElement
    {
        if (null === $body = $this->getXPathFirstItem('/xlf:xliff/xlf:file/xlf:body')) {
            throw new \InvalidArgumentException('Could not find the xliff body element');
        }

        /** @var XmlElement $transUnit */
        $transUnit = $this->createElementNS(self::XLIFF_NS, 'trans-unit');

        $body->appendChild($transUnit);

        $transUnit->setAttributeNS(self::XLIFF_NS, 'id', $identifier);
        $source = $transUnit->appendChild($this->createElementNS(self::XLIFF_NS, 'source'));
        if (null !== $sourceValue) {
            $source->appendChild($this->createTextNode($sourceValue));
        }

        return $transUnit;
    }