このようなものを考えると:
<source>
<somestuff>
<thead>
<row>C1</row>
</thead>
<tbody>
<row>C2</row>
<row>C3</row>
</tbody>
</somestuff>
<somestuff>
<tbody>
<row>C4</row>
<row>C5</row>
</tbody>
</somestuff>
<somestuff>
<tbody>
<row>C6</row>
<row>C7</row>
</tbody>
</somestuff>
</source>
最初の子として thead 要素の内容を次の tbody 要素にコピーする必要があります。(任意の数の thead 要素が存在する可能性があります。) 結果:
<source>
<somestuff>
<tbody>
<row>C1</row>
<row>C2</row>
<row>C3</row>
</tbody>
</somestuff>
<somestuff>
<tbody>
<row>C4</row>
<row>C5</row>
</tbody>
</somestuff>
<somestuff>
<tbody>
<row>C6</row>
<row>C7</row>
</tbody>
</somestuff>
</source>
私はこれを試しました
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output omit-xml-declaration="yes" indent="yes"/>
<xsl:strip-space elements="*"/>
<xsl:template match="node()|@*" name="identity" >
<xsl:copy>
<xsl:apply-templates select="node()|@*"/>
</xsl:copy>
</xsl:template>
<xsl:template match="tbody/*[1]">
<xsl:copy-of select=
"preceding-sibling::*[1]
[name()='thead']/row"/>
<xsl:call-template name="identity"/>
</xsl:template>
<!-- deleting the Head node -->
<xsl:template match="//thead"/>
</xsl:stylesheet>
しかし失敗しました。ありがとうございました。ラルフ