Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
floor Function
Collapse the table of content
Expand the table of content

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"
      xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

<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)'/>
</xsl:template>

</xsl:stylesheet>

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) =
      4




Build Date:

2012-08-02
Show:
© 2015 Microsoft