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

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:

© 2015 Microsoft