'Compile the attributes of the given elements into a list of AST nodes.'

def _compile_all_attributes(self, el, options, attr_already_created=False):

    body = []
    if any(((name.startswith('t-att') or (not name.startswith('t-'))) for (name, value) in el.attrib.iteritems())):
        if (not attr_already_created):
            attr_already_created = True
            body.append(ast.Assign(targets=[ast.Name(id='t_attrs', ctx=ast.Store())], value=ast.Call(func=ast.Name(id='OrderedDict', ctx=ast.Load()), args=[], keywords=[], starargs=None, kwargs=None)))
        items = (self._compile_static_attributes(el, options) + self._compile_dynamic_attributes(el, options))
        for item in items:
            if isinstance(item, tuple):
                body.append(ast.Assign(targets=[ast.Subscript(value=ast.Name(id='t_attrs', ctx=ast.Load()), slice=ast.Index(ast.Str(item[0])), ctx=ast.Store())], value=item[1]))
            elif item:
                body.append(ast.Expr(ast.Call(func=ast.Attribute(value=ast.Name(id='t_attrs', ctx=ast.Load()), attr='update', ctx=ast.Load()), args=[item], keywords=[], starargs=None, kwargs=None)))
    if attr_already_created:
        body.append(ast.For(target=ast.Tuple(elts=[ast.Name(id='name', ctx=ast.Store()), ast.Name(id='value', ctx=ast.Store())], ctx=ast.Store()), iter=ast.Call(func=ast.Attribute(value=ast.Name(id='t_attrs', ctx=ast.Load()), attr='iteritems', ctx=ast.Load()), args=[], keywords=[], starargs=None, kwargs=None), body=[ast.If(test=ast.BoolOp(op=ast.Or(), values=[ast.Name(id='value', ctx=ast.Load()), ast.Call(func=ast.Name(id='isinstance', ctx=ast.Load()), args=[ast.Name(id='value', ctx=ast.Load()), ast.Name(id='basestring', ctx=ast.Load())], keywords=[], starargs=None, kwargs=None)]), body=[self._append(ast.Str(u'    ')), self._append(ast.Name(id='name', ctx=ast.Load())), self._append(ast.Str(u'="')), self._append(ast.Call(func=ast.Name(id='escape', ctx=ast.Load()), args=[ast.Call(func=ast.Name(id='unicodifier', ctx=ast.Load()), args=[ast.Name(id='value', ctx=ast.Load())], keywords=[], starargs=None, kwargs=None)], keywords=[], starargs=None, kwargs=None)), self._append(ast.Str(u'"'))], orelse=[])], orelse=[]))
    return body
