1<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 2 version="1.0"> 3 <xsl:variable name="pos" select="position()"/> 4 <xsl:template match="/"> 5 <pos><xsl:value-of select="$pos"/></pos> 6 </xsl:template> 7</xsl:stylesheet> 8