'Start a list (<ul> or <ol>)
To know which level we\'re at, we have to count the number
of <text:list> elements on the tagstack.'

def s_text_list(self, tag, attrs):

    name = attrs.get((TEXTNS, 'style-name'))
    level = (self.tagstack.count_tags(tag) + 1)
    if name:
        name = name.replace('.', '_')
    else:
        name = self.tagstack.rfindattr((TEXTNS, 'style-name'))
    list_class = ('%s_%d' % (name, level))
    if self.generate_css:
        self.opentag(('%s' % self.listtypes.get(list_class, 'ul')), {'class': list_class})
    else:
        self.opentag(('%s' % self.listtypes.get(list_class, 'ul')))
    self.purgedata()
