1<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> 2 3<xsl:output encoding="utf-8"/> 4 5<xsl:template match="table"> 6 <document> 7 <xsl:apply-templates select="row[1]"/> 8 </document> 9</xsl:template> 10 11<xsl:template match="row"> 12 <row> 13 <first> 14 <xsl:value-of select="firstname"/> 15 </first> 16 <last> 17 <xsl:value-of select="lastname"/> 18 </last> 19 </row> 20 <xsl:apply-templates select="following-sibling::row[1]"/> 21</xsl:template> 22 23</xsl:stylesheet> 24