I corrected two errors:
(a) added a namespace declaration in the source XML
(b) changed <xsl:attribute name="name(.)"> to <xsl:attribute name="{name(.)}">
and it gave the required output. Without the curly braces the attribute has an invalid name, and the XSLT 1.0 spec allows silent recovery from that error by simply ignoring the attribute. I expect that's what happened to you.
However you can achieve the result more easily by writing the template body as:
<input><xsl:copy-of select="@*"/></input>
Michael Kay
http://www.saxonica.com/
Author, XSLT Programmer's Reference and XPath 2.0 Programmer's Reference