'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'))
    continue_numbering = (attrs.get((TEXTNS, 'continue-numbering')) == 'true')
    continue_list = attrs.get((TEXTNS, 'continue-list'))
    list_id = attrs.get(('http://www.w3.org/XML/1998/namespace', 'id'))
    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))
    tag_name = self.listtypes.get(list_class, 'ul')
    number_class = (tag_name + list_class)
    if list_id:
        self.list_id_map[list_id] = number_class
    if continue_list:
        if (continue_list in self.list_id_map):
            tglc = self.list_id_map[continue_list]
            self.list_number_map[number_class] = self.list_number_map[tglc]
        else:
            self.list_number_map.pop(number_class, None)
    elif (not continue_numbering):
        self.list_number_map.pop(number_class, None)
    self.list_class_stack.append(number_class)
    attrs = {}
    if ((tag_name == 'ol') and (self.list_number_map[number_class] != 1)):
        attrs = {'start': str(self.list_number_map[number_class])}
    if self.generate_css:
        attrs['class'] = list_class
    self.opentag(('%s' % tag_name), attrs)
    self.purgedata()
