ShoX reference documentation. Index
Default keyword for template is match or fun.
match [other attributes] (@select) {template}
fun [other attributes] (@match) {template}
match(zap){
<b>apply()</b>
}
match(zap[@id='u2']){
<b>apply()</b>
}
match[name='zap'](zap){
<b>apply()</b>
}
match[xmlns:zap='http://whatever.com'](zap){
<b>apply()</b>
}
fun(fibonaci){
par NrOfRabits='0'{}
switch {
case ($par>1) {
var generation1 = call fibonaci {
wpar NrOfRabits='$NrOfRabits - 1'{}
}
var generation2 = call fibonaci {
wpar NrOfRabits='$NrOfRabits - 2'{}
}
val($generation1 + generation2)
}
default {
text"1"
}
}
}
See also call-template.
XSL documentation of element xsl:template.