EXSLT - math:constant - Implementer Page

Version: 1
Status: implemented
User Page: index.html
XML Definition: math.constant.xml
Function Package: math.constant.zip

Function Syntax

number math:constant(string, number)

Template Syntax

<xsl:call-template name="math:constant">
   <xsl:with-param name="name" select="string" />
   <xsl:with-param name="precision" select="number" />
</xsl:call-template>

The math:constant function returns the specified constant to a set precision. The possible constants are:

  • PI
  • E
  • SQRRT2
  • LN2
  • LN10
  • LOG2E
  • SQRT1_2

An implementation of this extension function in the EXSLT math namespace must conform to the behaviour described in this document.

Implementations

No XSLT processors that we know of have built-in support for math:constant.

The following implementations of math:constant are available:

LanguageImplemented VersionCreatorDateDownload
XSLT Template1James Fuller2001-05-23math.constant.template.xsl
Javascript1James Fuller2001-05-23math.constant.js
EXSLT Function1James Fuller2001-05-23math.constant.function.xsl

Change History

Submitted: 2001-05-23
Creator: James Fuller(http://www.on-idle.com)

Returns a variety of standard mathematical constants.

http://www.exslt.org/math/functions/constant/math.constant.html last modified 2001-05-23