EXSLT - exsl:node-set - Use Case 2

Category: example
XML Definition: exsl.node-set.xml
Function or Template: function

This use case shows the result of using exsl:node-set() to convert a result tree fragment to a node-set.

Use Case

Source (view)

<doc />

Stylesheet (view)

<!--  Test exslt:node-set applied to a result tree fragment  -->
<xsl:variable name="tree">
   <a>
      <b>
         <c>
            <d />
         </c>
      </b>
   </a>
</xsl:variable>
<xsl:template match="/">
   <out>
      <xsl:value-of select="count(exslt:node-set($tree)//*)" />
   </out>
</xsl:template>

Result (view)

<out xmlns:exslt="http://exslt.org/common">4</out>

Change History

Previous Version: ..NaN.html

VersionModifiedByDetails
12001-04-28Mike Kay

Tests result tree fragment to node-set conversion.

http://www.exslt.org/exsl/functions/node-set/exsl.node-set.use-case.2.html last modified 2001-04-28