tests/expr/math/math-3305a.xsl
author Michael Kay <mike@saxonica.com>
Mon, 11 Jan 2016 11:27:29 +0000
changeset 1198 aacf3d6d8681
permissions -rw-r--r--
Variants of some math tests to force runtime evaluation
1198
aacf3d6d8681 Variants of some math tests to force runtime evaluation
Michael Kay <mike@saxonica.com>
parents:
diff changeset
     1
<?xml version="1.0" encoding="ISO-8859-1"?>
aacf3d6d8681 Variants of some math tests to force runtime evaluation
Michael Kay <mike@saxonica.com>
parents:
diff changeset
     2
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0"
aacf3d6d8681 Variants of some math tests to force runtime evaluation
Michael Kay <mike@saxonica.com>
parents:
diff changeset
     3
  xmlns:xs="http://www.w3.org/2001/XMLSchema">
aacf3d6d8681 Variants of some math tests to force runtime evaluation
Michael Kay <mike@saxonica.com>
parents:
diff changeset
     4
<?spec fo#func-abs?>
aacf3d6d8681 Variants of some math tests to force runtime evaluation
Michael Kay <mike@saxonica.com>
parents:
diff changeset
     5
<!-- PURPOSE:  Test of abs($p*) on all numeric data types. -->
aacf3d6d8681 Variants of some math tests to force runtime evaluation
Michael Kay <mike@saxonica.com>
parents:
diff changeset
     6
  <!-- Variant forcing runtime evaluation -->
aacf3d6d8681 Variants of some math tests to force runtime evaluation
Michael Kay <mike@saxonica.com>
parents:
diff changeset
     7
  
aacf3d6d8681 Variants of some math tests to force runtime evaluation
Michael Kay <mike@saxonica.com>
parents:
diff changeset
     8
  <xsl:param name="p" select="1"/>
aacf3d6d8681 Variants of some math tests to force runtime evaluation
Michael Kay <mike@saxonica.com>
parents:
diff changeset
     9
aacf3d6d8681 Variants of some math tests to force runtime evaluation
Michael Kay <mike@saxonica.com>
parents:
diff changeset
    10
<xsl:template match="doc">
aacf3d6d8681 Variants of some math tests to force runtime evaluation
Michael Kay <mike@saxonica.com>
parents:
diff changeset
    11
<out>;
aacf3d6d8681 Variants of some math tests to force runtime evaluation
Michael Kay <mike@saxonica.com>
parents:
diff changeset
    12
<int a="{abs($p*3)}" b="{abs($p*-3)}" c="{abs($p*0)}"/>
aacf3d6d8681 Variants of some math tests to force runtime evaluation
Michael Kay <mike@saxonica.com>
parents:
diff changeset
    13
<decimal a="{abs($p*3.2)}" b="{abs($p*-3.2)}" c="{abs($p*0.0)}"/>
aacf3d6d8681 Variants of some math tests to force runtime evaluation
Michael Kay <mike@saxonica.com>
parents:
diff changeset
    14
<double a="{abs($p*3.2e0)}" b="{abs($p*-3.2e0)}" c="{abs($p*0.0e0)}" d="{abs($p*-0.0e0)}" e="{abs($p*number('NaN'))}"
aacf3d6d8681 Variants of some math tests to force runtime evaluation
Michael Kay <mike@saxonica.com>
parents:
diff changeset
    15
   f="{abs($p*1e0 div 0)}" g="{abs($p*-1e0 div 0)}"/>
aacf3d6d8681 Variants of some math tests to force runtime evaluation
Michael Kay <mike@saxonica.com>
parents:
diff changeset
    16
<float a="{abs($p*xs:float(3.2e0))}" b="{abs($p*xs:float(-3.2e0))}" c="{abs($p*xs:float(0.0e0))}" 
aacf3d6d8681 Variants of some math tests to force runtime evaluation
Michael Kay <mike@saxonica.com>
parents:
diff changeset
    17
d="{abs($p*xs:float(-0.0e0))}" e="{abs($p*xs:float('NaN'))}"   f="{abs($p*xs:float(1e0 div 0))}" 
aacf3d6d8681 Variants of some math tests to force runtime evaluation
Michael Kay <mike@saxonica.com>
parents:
diff changeset
    18
g="{abs($p*xs:float(-1e0 div 0))}"/>
aacf3d6d8681 Variants of some math tests to force runtime evaluation
Michael Kay <mike@saxonica.com>
parents:
diff changeset
    19
</out>
aacf3d6d8681 Variants of some math tests to force runtime evaluation
Michael Kay <mike@saxonica.com>
parents:
diff changeset
    20
</xsl:template>
aacf3d6d8681 Variants of some math tests to force runtime evaluation
Michael Kay <mike@saxonica.com>
parents:
diff changeset
    21
</xsl:stylesheet>