﻿id,summary,reporter,owner,description,type,status,priority,milestone,component,version,resolution,keywords,cc
360,py:attrs can create duplicate attributes,charles@…,cmlenz,"Given the following script `genshi_test.py`:
{{{
#!python

import genshi
import genshi.template

print genshi.template.MarkupTemplate(""""""
<root
   xmlns:py=""http://genshi.edgewall.org/""
   xmlns:xlink=""http://www.w3.org/1999/xlink"">
  <image xlink:href=""default_img.png"" py:attrs=""{'xlink:href':'non_default_img.png'}""/>
</root>
"""""").generate().render()
}}}

the following (invalid) XML is generated:

{{{
#!xml
<root xmlns:xlink=""http://www.w3.org/1999/xlink"">
  <image xlink:href=""default_img.png"" xlink:href=""non_default_img.png""/>
</root>
}}}

xmllint reports a parse error as follows:
{{{
cduffy@shiny-ubuntu:~$ xmllint genshi_test.out.xml 
genshi_test.out.xml:2: parser error : Attribute xlink:href redefined
  <image xlink:href=""default_img.png"" xlink:href=""non_default_img.png""/>
                                                                      ^
}}}

Given that the documentation indicates that `py:attrs` is able to modify existing attributes, my expectation as a user is that the preexisting attribute will be deleted.",defect,new,major,0.9,General,0.5.1,,,
