We cannot change the way <img> is parsed. See e.g. http://software.hixie.ch/utilities/js/live-dom-viewer/ for the tree you get with that markup. It's not what you expect.
<setsrc>
<img src="foo.jpg">
<set src="foo1.jpg" width="100">
<set src="foo2.jpg" density="2">
</setsrc>
Always be wary of allowing arguments that hinge on "it's not technically possible" to shut down good ideas. <imgset>
<img src="foo.jpg">
<img src="foo1.jpg" width="100">
<img src="foo2.jpg" density="2">
</imgset> imgset img{display:none;}
imgset img:first-child{display:block;}
Same with modern HTML5 tags, modernizer or any other tool would handle that for you.