1<xsl:stylesheet version="1.0" 2 xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> 3 4<xsl:param name="x" select="/.."/> 5 6<xsl:template match="doc"> 7<doc value="{count($x)}"/> 8</xsl:template> 9 10</xsl:stylesheet> 11