def footnotemap(self, cache=True):
        """return the footnotes from the docx, keyed to string id."""
        if self.__footnotemap is not None and cache==True:
            return self.__footnotemap
        else:
            x = self.xml(src='word/footnotes.xml')
            d = Dict()
            if x is None: return d
            for footnote in x.root.xpath("w:footnote", namespaces=self.NS):
                id = footnote.get("{%(w)s}id" % self.NS)
                typ = footnote.get("{%(w)s}type" % self.NS)
                d[id] = Dict(id=id, type=typ, elem=footnote)
            if cache==True: self.__footnotemap = d
            return d