Export (0) Print
Expand All
0 out of 1 rated this helpful - Rate this topic

floor Function

Returns the largest integer that is not greater than the argument.

          number floor(number)

This example demonstrates floor() expressions.

XML File

None; the XSLT file calls itself.

XSLT File (floor.xsl)

<?xml version='1.0'?>
<?xml-stylesheet type="text/xsl" href="floor.xsl"?>
<xsl:stylesheet version="1.0"

<xsl:template match="/">
   <p/>floor(3.5) = 
      <xsl:value-of select='floor(3.5)'/>
   <p/>floor(-1.3) = 
      <xsl:value-of select='floor(-1.3)'/>
   <p/>floor(4) = 
      <xsl:value-of select='floor(4)'/>


Formatted Output

floor(3.5) = 3

floor(-1.3) = -2

floor(4) = 4

Processor Output

<?xml version="1.0"?><p />floor(3.5) =
      3<p />floor(-1.3) =
      -2<p />floor(4) =

Build Date:

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
© 2014 Microsoft. All rights reserved.