'Called from element.py'

def build_caches(self, element):

    if (element.qname not in self.element_dict):
        self.element_dict[element.qname] = []
    self.element_dict[element.qname].append(element)
    if (element.qname == (STYLENS, 'style')):
        self.__register_stylename(element)
    styleref = element.getAttrNS(TEXTNS, 'style-name')
    if ((styleref is not None) and (styleref in self._styles_ooo_fix)):
        element.setAttrNS(TEXTNS, 'style-name', self._styles_ooo_fix[styleref])
