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" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <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)'/> </xsl:template> </xsl:stylesheet>
Formatted Output
ceiling(2.5) = 3
ceiling(-2.3) = -2
ceiling(4) = 4
Processor Output
<?xml version="1.0" encoding="UTF-16"?><p />ceiling(2.5) = 3<p />ceiling(-2.3) = -2<p />ceiling(4) = 4
Data Types in Schemas | XDR Schema Data Types Reference | XML Data Types Reference