#105 closed defect (fixed)
ET does not convert attribute names to QName.
| Reported by: | Maciej Ligenza | Owned by: | cmlenz |
|---|---|---|---|
| Priority: | major | Milestone: | 0.4 |
| Component: | Template processing | Version: | 0.3.6 |
| Keywords: | Cc: |
Description
ET helper does not prepare attributes properly. The attributes are held in form Attrs( list_of( (string, string) ) ) instead of Attrs( list_of( (QName,string) ) ) (see: source:trunk/genshi/input.py@504#L33). In that form NamespaceFlattener.__call__() (and probably others) can't cope with them properly (see: source:trunk/genshi/output.py@504#L440).
Change History (2)
comment:1 Changed 19 years ago by Maciej Ligenza
comment:2 Changed 19 years ago by cmlenz
- Resolution set to fixed
- Status changed from new to closed
Patch applied in [511].
Note: See
TracTickets for help on using
tickets.

Patch that helps:
$ LC_ALL=C svn diff Index: genshi/input.py =================================================================== --- genshi/input.py (revision 505) +++ genshi/input.py (working copy) @@ -30,7 +30,7 @@ def ET(element): """Convert a given ElementTree element to a markup stream.""" tag_name = QName(element.tag.lstrip('{')) - attrs = Attrs(element.items()) + attrs = Attrs([(QName(attr), value) for attr, value in element.items()]) yield START, (tag_name, attrs), (None, -1, -1) if element.text: