Note: The children of a node refers to the text within an element as well as any nodes within it. Consider this snippet:
<LG>
<FIRSTL>
Let us go then, you and I,
</FIRSTL>
When the evening is spread out against the sky...
</LG>The children of LG are the FIRSTL element and the text "When the evening is spread out against the sky..."
Now, some basic recipes.
<xsl:template match="FIRSTL">
<FIRSTL>
<xsl:apply-templates/>
</FIRSTL>
</xsl:template>
<xsl:template match="FIRSTL">
<xsl:apply-templates/>
</xsl:template>
<xsl:template match="FIRSTL">
<FIRSTL>
<xsl:copy-of select="@*"/>
<xsl:apply-templates/>
</FIRSTL>
</xsl:template>
<xsl:template match="NOTE">
<NOTE>
<xsl:copy-of select="@NAME"/>
<xsl:copy-of select="@TYPE"/>
<xsl:apply-templates/>
<xsl:if test="@R">
<xsl:attribute name="REND">
<xsl:value-of select="R"/>
</xsl:attribute>
</xsl:if>
</NOTE>
</xsl:template>
<xsl:template match="DEDICAT[ancestor::POEM]">
[transformations here]
</xsl:template>