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

Built-in support for math:constant is available in the following XSLT processors:

ProcessorProcessor VersionImplemented Version
4XSLT, from 4Suite.0.12.0a31
libxslt from Daniel Veillard et al.1.0.191

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.ruminate.co.uk)

Returns a variety of standard mathematical constants.
VersionModifiedByDetails
1.12002-08-21Craig Stewart

Added 4XSLT and libxslt implementation to the list.

1.22002-11-12Craig Stewart

Updated 4XSLT version to 0.12.0a3.

http://www.exslt.org/math/functions/constant/math.constant.html last modified 2002-11-12