Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

ceiling Function

Returns the smallest integer that is not less than the argument.

number ceiling(number)

This example demonstrates ceiling() expressions.

XML File

None; the XSLT file calls itself.

XSLT File (ceiling.xsl)

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

<xsl:template match="/">
   <p/>ceiling(2.5) = 
      <xsl:value-of select='ceiling(2.5)'/>
   <p/>ceiling(-2.3) = 
      <xsl:value-of select='ceiling(-2.3)'/>
   <p/>ceiling(4) = 
      <xsl:value-of select='ceiling(4)'/>


Formatted Output

ceiling(2.5) = 3

ceiling(-2.3) = -2

ceiling(4) = 4

Processor Output

<?xml version="1.0"?><p />ceiling(2.5) =
      3<p />ceiling(-2.3) =
      -2<p />ceiling(4) =

Build Date:

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