1<?xml version="1.0"?> 2<xsl:stylesheet version="1.0" 3 xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 4 xmlns:math="http://exslt.org/math" 5 extension-element-prefixes="math"> 6 7<!-- Test math:exp() --> 8<xsl:variable name="power1" select="5"/> 9<xsl:variable name="power2" select="0.0"/> 10<xsl:variable name="power3" select="-3"/> 11<xsl:variable name="power4" select="math:constant(PI,$power1)"/> 12<xsl:variable name="input1" select="number(//number[1])"/> 13<xsl:variable name="input2" select="number(//number[2])"/> 14<xsl:variable name="input3" select="$input1 div $zero"/> 15 16 17<xsl:template match="/"> 18 <out> 19 This is for testing the Euler constant to the power of <xsl:value-of select="$power1"/>: 20 <xsl:value-of select="math:exp($power1)"/> 21 This is for testing the Euler constant to the power of <xsl:value-of select="$power2"/>: 22 <xsl:value-of select="math:exp($power2)"/> 23 This is for testing the Euler constant to the power of <xsl:value-of select="$power3"/>: 24 <xsl:value-of select="math:exp($power3)"/> 25 This is for testing the Euler constant to the power of <xsl:value-of select="$power4"/>: 26 <xsl:value-of select="math:exp($power4)"/> 27 This is testing Euler constant to the power of <xsl:value-of select="$input1"/>: 28 <xsl:value-of select="math:exp($input1)"/> 29 This is testing Euler constant to the power of <xsl:value-of select="$input2"/>: 30 <xsl:value-of select="math:exp($input2)"/> 31 This is testing Euler constant to the power of <xsl:value-of select="$input3"/>: 32 <xsl:value-of select="math:exp($input3)"/> 33 34 </out> 35 36</xsl:template> 37 38 39 <!-- 40 * Licensed to the Apache Software Foundation (ASF) under one 41 * or more contributor license agreements. See the NOTICE file 42 * distributed with this work for additional information 43 * regarding copyright ownership. The ASF licenses this file 44 * to you under the Apache License, Version 2.0 (the "License"); 45 * you may not use this file except in compliance with the License. 46 * You may obtain a copy of the License at 47 * 48 * http://www.apache.org/licenses/LICENSE-2.0 49 * 50 * Unless required by applicable law or agreed to in writing, software 51 * distributed under the License is distributed on an "AS IS" BASIS, 52 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 53 * See the License for the specific language governing permissions and 54 * limitations under the License. 55 --> 56 57</xsl:stylesheet> 58