Operator "*" is used for multiplications. Spaces around the operator are not mandatory.
In most programming languages slash "/" is used for division. Because XPath expressions are using slash as path separator (e.g. /aaa/bbb/ccc) another operator must be used. XPath 2.0 uses operator "div" for floating point division and operator "idiv" for integer division.
XSLT <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0"> <xsl:output method="xml" indent="yes" omit-xml-declaration="yes"/> <xsl:template match="/aaa"> <bbb> <xsl:value-of select="12 * 23"/> </bbb> <ccc> <xsl:value-of select="x*y"/> </ccc> <ddd> <xsl:value-of select="x div y"/> </ddd> <eee> <xsl:value-of select="x idiv y"/> </eee> <fff> <xsl:value-of select="-3 idiv 2"/> </fff> </xsl:template> </xsl:stylesheet> |
|
XML <aaa> <x>5</x> <y>3</y> </aaa> | Output <bbb>276</bbb> <ccc>15</ccc> <ddd>1.6666666666666667</ddd> <eee>1</eee> <fff>-1</fff> |
Previous chapter: | Implicit behaviour |
Next chapter: | Functions operating on strings |
Previous page: | Addition and subtraction |
Next page: | Modulus |
You can also get Organic Skin Care products from Bliss Bath Body and you must check out their Natural Body Lotions and bath soaps
Now if you are looking for the best deals on surf clothing from Quiksilver and Roxy then you have to check these amazing deals here:
Hey, check out this Organic Skin Care European Soaps along with Natural Lavender Body Lotion and shea butter
and we can get surf t shirts surfing shirt and And you must check out this website swim suit swimming suit and swim trunks