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