protected function create(TemplateInterface $template)
    {
        $result = array();

        /** @var File $file */
        foreach ($this->fileset as $file) {
            $rst = new Document($this, $file);
            $destination = $this->getDestinationFilenameRelativeToProjectRoot($file);
            $this->setDestinationRoot($destination);

            if ($this->getLogger()) {
                $this->getLogger()->info('Parsing file "' . $file->getRealPath() . '"');
            }

            try {
                $xhtml_document = $rst->getAsXhtml();
                $converted_contents = $template->decorate($xhtml_document->save(), $this->options);
                $rst->logStats(null, $this->getLogger());
            } catch (\Exception $e) {
                $rst->logStats($e, $this->getLogger());
                continue;
            }

            $result[$destination] = $converted_contents;
        }

        return $result;
    }