'Write the metainfo file nav.xhtml.'

def build_navigation_doc(self, outdir, outname):

    logger.info('writing    %s    file...', outname)
    if (self.config.epub_tocscope == 'default'):
        doctree = self.env.get_and_resolve_doctree(self.config.master_doc, self, prune_toctrees=False, includehidden=False)
        refnodes = self.get_refnodes(doctree, [])
        self.toc_add_files(refnodes)
    else:
        refnodes = self.refnodes
    navlist = self.build_navlist(refnodes)
    copy_asset_file(path.join(self.template_dir, 'nav.xhtml_t'), path.join(outdir, outname), self.navigation_doc_metadata(navlist))
    if (outname not in self.files):
        self.files.append(outname)
