tests/expr/math/math-3301a.xsl
author Michael Kay <mike@saxonica.com>
Mon, 11 Jan 2016 11:27:29 +0000
changeset 1198 aacf3d6d8681
child 1208 b16728df2ffd
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
<?spec fo#func-round-half-to-even?>
aacf3d6d8681 Variants of some math tests to force runtime evaluation
Michael Kay <mike@saxonica.com>
parents:
diff changeset
     4
<!-- PURPOSE:  Test of round-half-to-even on integers. -->
aacf3d6d8681 Variants of some math tests to force runtime evaluation
Michael Kay <mike@saxonica.com>
parents:
diff changeset
     5
    <!-- variant of 3301 forcing run-time evaluation -->
aacf3d6d8681 Variants of some math tests to force runtime evaluation
Michael Kay <mike@saxonica.com>
parents:
diff changeset
     6
    
aacf3d6d8681 Variants of some math tests to force runtime evaluation
Michael Kay <mike@saxonica.com>
parents:
diff changeset
     7
    <xsl:param name="p" select="1"/>
aacf3d6d8681 Variants of some math tests to force runtime evaluation
Michael Kay <mike@saxonica.com>
parents:
diff changeset
     8
aacf3d6d8681 Variants of some math tests to force runtime evaluation
Michael Kay <mike@saxonica.com>
parents:
diff changeset
     9
<xsl:template match="doc">
aacf3d6d8681 Variants of some math tests to force runtime evaluation
Michael Kay <mike@saxonica.com>
parents:
diff changeset
    10
<out>;
aacf3d6d8681 Variants of some math tests to force runtime evaluation
Michael Kay <mike@saxonica.com>
parents:
diff changeset
    11
    <a b="{round-half-to-even($p*120)}" c="{round-half-to-even($p*0)}" d="{round-half-to-even($p*-3)}"/>;
aacf3d6d8681 Variants of some math tests to force runtime evaluation
Michael Kay <mike@saxonica.com>
parents:
diff changeset
    12
    <a b="{round-half-to-even($p*120, 2)}" c="{round-half-to-even($p*0, 2)}" d="{round-half-to-even($p*-3, 2)}"/>;
aacf3d6d8681 Variants of some math tests to force runtime evaluation
Michael Kay <mike@saxonica.com>
parents:
diff changeset
    13
    <a b="{round-half-to-even($p*120, -2)}" c="{round-half-to-even($p*0, -2)}" d="{round-half-to-even($p*-3, -2)}"/>;
aacf3d6d8681 Variants of some math tests to force runtime evaluation
Michael Kay <mike@saxonica.com>
parents:
diff changeset
    14
    <a b="{round-half-to-even($p*180, -2)}" c="{round-half-to-even($p*150, -2)}" d="{round-half-to-even($p*250, -2)}"/>;
aacf3d6d8681 Variants of some math tests to force runtime evaluation
Michael Kay <mike@saxonica.com>
parents:
diff changeset
    15
    <a b="{round-half-to-even($p*-180, -2)}" c="{round-half-to-even($p*-150, -2)}" d="{round-half-to-even($p*-250, -2)}"/>;
aacf3d6d8681 Variants of some math tests to force runtime evaluation
Michael Kay <mike@saxonica.com>
parents:
diff changeset
    16
</out>
aacf3d6d8681 Variants of some math tests to force runtime evaluation
Michael Kay <mike@saxonica.com>
parents:
diff changeset
    17
</xsl:template>
aacf3d6d8681 Variants of some math tests to force runtime evaluation
Michael Kay <mike@saxonica.com>
parents:
diff changeset
    18
</xsl:stylesheet>