Dave Jarvis' Repositories

git clone https://repo.autonoma.ca/repo/delibero.git

Using EXSLT-compliant SAXON 9.1 HE for math functions.

AuthorDave Jarvis <email>
Date2015-01-15 22:51:39 GMT-0800
Commitd7696def07f560b4aa8c6f0947e0a5902ca8de6d
Parent5fddd0a
build.gradle
compile "org.apache.shiro:shiro-core:1.2.3"
- // XSLT 2.0
- compile "net.sf.saxon:Saxon-HE:9.4"
+ // XSLT 2.0 with EXSLT (http://exslt.org/)
+ compile "net.sourceforge.saxon:saxon:9.1.0.8"
+
+ // XSLT 2.0 without EXLST
+ //compile "net.sf.saxon:Saxon-HE:9.4"
// Database
source/xsl/colour.xsl
| Copyright 2014 White Magic Software, Inc.
+-->
-<xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+<xsl:stylesheet version="2.0"
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ xmlns:math="http://exslt.org/math"
+ extension-element-prefixes="math">
<!-- Reference white (X, Y, and Z components) -->
</xsl:variable>
- <xsl:variable name="lch_h">
- <xsl:call-template name="atan2">
- <xsl:with-param name="x" select="$lab_b"/>
- <xsl:with-param name="y" select="$lab_a"/>
- </xsl:call-template>
- </xsl:variable>
+ <xsl:variable name="lch_h" select="math:atan2( $lab_b, $lab_a )"/>
<!--
source/xsl/math.xsl
<xsl:stylesheet version="2.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- xmlns:fn="http://www.w3.org/2005/xpath-functions">
+ xmlns:math="http://exslt.org/math"
+ extension-element-prefixes="math">
<xsl:variable name="PI">3.14159265358979323846264338327950</xsl:variable>
<xsl:param name="x"/>
<!--xsl:value-of select="($x &gt;= 0) * $x - not($x &gt;= 0) * $x"/-->
- <xsl:value-of select="fn:abs( $x )"/>
+ <xsl:value-of select="math:abs( $x )"/>
</xsl:template>
Delta13 lines added, 11 lines removed, 2-line increase