Mercurial > genshi > mirror
diff genshi/template/markup.py @ 552:b59d99d2f631 trunk
For directives used as elements, pass all attributes without a namespace to the directive class. This enables adding optional extra attributes to directives.
author | cmlenz |
---|---|
date | Mon, 02 Jul 2007 13:33:28 +0000 |
parents | 619340e2d805 |
children | 8f7ce3b9ab4f 36b5a03534a0 |
line wrap: on
line diff
--- a/genshi/template/markup.py +++ b/genshi/template/markup.py @@ -118,8 +118,9 @@ if cls is None: raise BadDirectiveError(tag.localname, self.filepath, pos[1]) - value = attrs.get(getattr(cls, 'ATTRIBUTE', None), '') - directives.append((cls, value, ns_prefix.copy(), pos)) + args = dict([(name.localname, value) for name, value + in attrs if not name.namespace]) + directives.append((cls, args, ns_prefix.copy(), pos)) strip = True new_attrs = []