You can't have attributes in an end tag.
Try
<xsl:template match="root">
<xsl:copy>
<xsl:apply-templates select="*[1]"/>
</xsl:copy>
</xsl:template>
<xsl:template match="group">
<xsl:copy>
<xsl:copy-of select="@name"/>
<xsl:apply-templates select="following-sibling::*[1]"/>
</xsl:copy>
</xsl:template>
Michael Kay
http://www.saxonica.com/
Author, XSLT Programmer's Reference and XPath 2.0 Programmer's Reference