1<xsl:stylesheet version="1.0" 2 xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 3 xmlns:fo="http://www.w3.org/1999/XSL/Format"> 4 5<xsl:variable name="n">2</xsl:variable> 6 7<xsl:template match="doc"> 8<xsl:value-of select="item[position()=$n]"/> 9</xsl:template> 10 11</xsl:stylesheet> 12