public function withParameters(string $nameSpace, array $params): self
    {
        if (false === $this->xsltProcessor->setParameter($nameSpace, $params)) {
            throw new XslProcessorException('Could not set parameters in ' . $nameSpace);
        }

        if (!isset($this->parameters[$nameSpace])) {
            $this->parameters[$nameSpace] = [];
        }

        $this->parameters[$nameSpace] = array_merge($this->parameters[$nameSpace], $params);
        return $this;
    }