tests/expr/math/math-3306a.xsl
changeset 1198 aacf3d6d8681
child 1211 226a4c4600fb
equal deleted inserted replaced
1197:d300f98a5bb8 1198:aacf3d6d8681
       
     1 <?xml version="1.0" encoding="ISO-8859-1"?>
       
     2 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0"
       
     3   xmlns:xs="http://www.w3.org/2001/XMLSchema">
       
     4 <?spec fo#casting-to-numerics?>
       
     5 <!-- PURPOSE:  Test that casting to integer truncates towards zero. -->
       
     6   <!-- Variant forcing run-time evaluation -->
       
     7   
       
     8   <xsl:param name="p" select="1"/>
       
     9 <xsl:template match="doc">
       
    10 <out>;
       
    11 <decimal a="{xs:integer($p*3.8)}" b="{xs:integer($p*-3.8)}"/>
       
    12 <double a="{xs:integer($p*3.8e0)}" b="{xs:integer($p*-3.8e0)}"/>
       
    13 <float a="{xs:integer($p*xs:float(3.8e0))}" b="{xs:integer($p*xs:float(-3.8e0))}"/>
       
    14 </out>
       
    15 </xsl:template>
       
    16 </xsl:stylesheet>