public function build($basepath, $language = null)
    {
        $sitemapElements = [];

        foreach ($this->sitemapElementGenerators as $sitemapElementGenerator) {
            $sitemapElements = array_merge(
                $sitemapElements,
                $sitemapElementGenerator->generateElements($language)
            );
        }

        $data = $this
            ->sitemapRenderer
            ->render($sitemapElements, $basepath);

        return $data;
    }