Modules | Category: example
This use case tests the result of a function that involves a Use CaseSource (view)<doc>
<section index="section1"
index2="atr2val">
<section index="subSection1.1">
<p>Hello</p>
<p>Hello again.</p>
</section>
</section>
<section index="section2">
<p>Hello2</p>
<section index="subSection2.1">
<p>Hello</p>
<p>Hello again.</p>
</section>
<section index="subSection2.2">
<p>Hello</p>
<p>Hello again.</p>
</section>
<p>Hello2 again.</p>
<section index="subSection2.3">
<p>Hello</p>
<p>Hello again.</p>
</section>
</section>
</doc>Stylesheet (view)<func:function name="my:count-elements">
<xsl:for-each select="(//*)[1]">
<func:result select="count(//*)" />
</xsl:for-each>
</func:function>
<xsl:template match="/">
<out>
<xsl:value-of select="my:count-elements()" />
</out>
</xsl:template>Result (view)<out xmlns:my="my://own.uri">17</out> Change HistoryPrevious Version: ..NaN.html
|
http://www.exslt.org/func/elements/function/func.function.use-case.1.html last modified 2001-04-28