1<?xml version="1.0"?> 2 3<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" 4xmlns:exslt="http://exslt.org/common" > 5 6<!-- Test exslt:node-set applied to a result tree fragment --> 7 8<xsl:variable name="tree"> 9<a><b><c><d/></c></b></a> 10</xsl:variable> 11 12<xsl:template match="/"> 13 <out> 14 <xsl:value-of select="count(exslt:node-set($tree)//*)"/> 15 </out> 16</xsl:template> 17 18</xsl:stylesheet> 19