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:atan() --> 8 9<xsl:variable name="zero" select="0"/> 10<xsl:variable name="nzero" select="-0"/> 11<xsl:variable name="num1" select="1.99"/> 12<xsl:variable name="num2" select="3.1428475"/> 13<xsl:variable name="temp1" select="-7"/> 14<xsl:variable name="temp2" select="-9.99999"/> 15<xsl:variable name="rad1" select="1.0"/> 16<xsl:variable name="rad2" select="25"/> 17<xsl:variable name="rad3" select="0.253"/> 18<xsl:variable name="rad4" select="-0.888"/> 19<xsl:variable name="input1" select="number(//number[1])"/> 20<xsl:variable name="input2" select="number(//number[2])"/> 21<xsl:variable name="input3" select="$input1 div $zero"/> 22 23<xsl:template match="/"> 24 <out> 25 26 ArcTan value of zero is: 27 <xsl:value-of select="math:atan($zero)"/><br/> 28 ArcTan value of nzero is: 29 <xsl:value-of select="math:atan($nzero)"/><br/> 30 ArcTan value of num1 is: 31 <xsl:value-of select="math:atan($num1)"/><br/> 32 ArcTan value of num2 is: 33 <xsl:value-of select="math:atan($num2)"/><br/> 34 ArcTan value of temp1 is: 35 <xsl:value-of select="math:atan($temp1)"/><br/> 36 ArcTan value of temp2 is: 37 <xsl:value-of select="math:atan($temp2)"/><br/> 38 ArcTan value of rad1 is: 39 <xsl:value-of select="math:atan($rad1)"/><br/> 40 ArcTan value of rad2 is: 41 <xsl:value-of select="math:atan($rad2)"/><br/> 42 ArcTan value of rad3 is: 43 <xsl:value-of select="math:atan($rad3)"/><br/> 44 ArcTan value of rad4 is: 45 <xsl:value-of select="math:atan($rad4)"/><br/> 46 ArcTan value of input1 number is: 47 <xsl:value-of select="math:atan($input1)"/><br/> 48 ArcTan value of input2 number is: 49 <xsl:value-of select="math:atan($input2)"/><br/> 50 ArcTan value of input3 number is: 51 <xsl:value-of select="math:atan($input3)"/> 52 </out> 53</xsl:template> 54 55 56 <!-- 57 * Licensed to the Apache Software Foundation (ASF) under one 58 * or more contributor license agreements. See the NOTICE file 59 * distributed with this work for additional information 60 * regarding copyright ownership. The ASF licenses this file 61 * to you under the Apache License, Version 2.0 (the "License"); 62 * you may not use this file except in compliance with the License. 63 * You may obtain a copy of the License at 64 * 65 * http://www.apache.org/licenses/LICENSE-2.0 66 * 67 * Unless required by applicable law or agreed to in writing, software 68 * distributed under the License is distributed on an "AS IS" BASIS, 69 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 70 * See the License for the specific language governing permissions and 71 * limitations under the License. 72 --> 73 74</xsl:stylesheet> 75