Modules | Category: example This use case tests a function with defaulted arguments. Use CaseSource (view)<doc> <section index="section1" index2="atr2val"> <section index="subSection1.1"> <p>Hello</p> <p>Its me again.</p> </section> </section> <section index="section2"> <p>Jam</p> <section index="subSection2.1"> <p>Marmalade</p> <p>And Honey</p> </section> <section index="subSection2.2"> <p>With peanut butter</p> <p>On toast</p> </section> <p>Delicious!</p> <section index="subSection2.3"> <p>Full up now?</p> <p>You bet.</p> </section> </section> </doc> Stylesheet (view)<!-- Test an EXSLT function call with defaulted arguments --> <func:function name="func:total"> <xsl:param name="n1" select="0" /> <xsl:param name="n2" select="0" /> <xsl:param name="n3" select="0" /> <xsl:param name="n4" select="0" /> <xsl:param name="n5" select="0" /> <xsl:param name="n6" select="0" /> <xsl:param name="n7" select="0" /> <func:result select="$n1+$n2+$n3+$n4+$n5+$n6+$n7" /> </func:function> <xsl:template match="/"> <out> <xsl:value-of select="func:total(1,2,3,4,5)" /> </out> </xsl:template> Result (view)<out>15</out> Change HistoryPrevious Version: ..NaN.html
|
http://www.exslt.org/func/elements/function/func.function.use-case.5.html last modified 2001-04-28