zettacode.files/arithmetic.integer/xslt.txt in zettacode-0.1.0 vs zettacode.files/arithmetic.integer/xslt.txt in zettacode-0.1.1
- old
+ new
@@ -1,10 +1,10 @@
-:m m="mc"
- : =""5:
- : ="b"2:
- f:bc + b = :u-f c="$ + $b"f:bc
- f:bc - b = :u-f c="$ - $b"f:bc
- f:bc * b = :u-f c="$ * $b"f:bc
- f:bc b = :u-f c="u($ $b)"f:bc
- f:bc b = :u-f c="$ $b"f:bc
- :
+<xsl:template name="arithmetic">
+ <xsl:param name="a">5</xsl:param>
+ <xsl:param name="b">2</xsl:param>
+ <fo:block>a + b = <xsl:value-of select="$a + $b"/></fo:block>
+ <fo:block>a - b = <xsl:value-of select="$a - $b"/></fo:block>
+ <fo:block>a * b = <xsl:value-of select="$a * $b"/></fo:block>
+ <fo:block>a / b = <xsl:value-of select="round($a div $b)"/></fo:block>
+ <fo:block>a mod b = <xsl:value-of select="$a mod $b"/></fo:block>
+ </xsl:template>