Good morning, I'm trying to write an XSLT 1.0 trasformation to transform this
<foo>
<document>
<content name="bar1">Bar1</content>
<content name="bar2">Bar2</content>
<content name="bar3">Bar3</content>
...
</document>
</foo>
to this
<foo>
<document>
<content name="bar1" set="top">Bar1</content>
<content name="bar2" set="top">Bar2</content>
<content name="bar3" set="top">Bar3</content>
...
</document>
</foo>
so I tried this XSLT transformation
<xsl:template match="node()|@*">
<xsl:copy>
<xsl:apply-templates select="node()|@*" />
</xsl:copy>
</xsl:template>
<foo>
<document>
<xsl:template match="/document/*">
<xsl:copy>
<xsl:apply-templates />
<xsl:attribute name="set" select="'top'" />
</xsl:copy>
</xsl:template>
</document>
</foo>
but sadly it didn't worked
I've tried searching a lot in xpath and xslt guides but I can't get this work, can someone help me?