--- /dev/null
+<?xml version="1.0"?>
+<!-- Copyright (C) 2000, HELM Team -->
+<!-- This file is part of HELM, an Hypertextual, Electronic -->
+<!-- Library of Mathematics, developed at the Computer Science -->
+<!-- Department, University of Bologna, Italy. -->
+<!-- HELM is free software; you can redistribute it and/or -->
+<!-- modify it under the terms of the GNU General Public License -->
+<!-- as published by the Free Software Foundation; either version 2 -->
+<!-- of the License, or (at your option) any later version. -->
+<!-- HELM is distributed in the hope that it will be useful, -->
+<!-- but WITHOUT ANY WARRANTY; without even the implied warranty of -->
+<!-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -->
+<!-- GNU General Public License for more details. -->
+<!-- You should have received a copy of the GNU General Public License -->
+<!-- along with HELM; if not, write to the Free Software -->
+<!-- Foundation, Inc., 59 Temple Place - Suite 330, Boston, -->
+<!-- MA 02111-1307, USA. -->
+<!-- For details, see the HELM World-Wide-Web page, -->
+<!-- http://cs.unibo.it/helm/. -->
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:i="http://www.cs.unibo.it/helm/InputNotationalElements" xmlns:o="http://www.cs.unibo.it/helm/OutputNotationalElements" version="1.0">
+<!-- HTML SYMBOLS -->
+<!--leq-->
+ <xsl:variable name="leq">
+ <xsl:choose>
+ <xsl:when test="$UNICODEvsSYMBOL = 'symbol'">£</xsl:when>
+ <xsl:when test="$UNICODEvsSYMBOL = 'unicode'">≤</xsl:when>
+ <xsl:otherwise>???</xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+<!--lt-->
+ <xsl:variable name="lt">
+ <xsl:choose>
+ <xsl:when test="$UNICODEvsSYMBOL = 'symbol'"><</xsl:when>
+ <xsl:when test="$UNICODEvsSYMBOL = 'unicode'">< </xsl:when>
+ <xsl:otherwise>???</xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+<!--geq-->
+ <xsl:variable name="geq">
+ <xsl:choose>
+ <xsl:when test="$UNICODEvsSYMBOL = 'symbol'">³</xsl:when>
+ <xsl:when test="$UNICODEvsSYMBOL = 'unicode'">≥</xsl:when>
+ <xsl:otherwise>???</xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+<!--gt-->
+ <xsl:variable name="gt">
+ <xsl:choose>
+ <xsl:when test="$UNICODEvsSYMBOL = 'symbol'">></xsl:when>
+ <xsl:when test="$UNICODEvsSYMBOL = 'unicode'">></xsl:when>
+ <xsl:otherwise>???</xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+<!--plus-->
+ <xsl:variable name="plus">
+ <xsl:choose>
+ <xsl:when test="$UNICODEvsSYMBOL = 'symbol'">+</xsl:when>
+ <xsl:when test="$UNICODEvsSYMBOL = 'unicode'">+</xsl:when>
+ <xsl:otherwise>???</xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+<!--minus-->
+ <xsl:variable name="minus">
+ <xsl:choose>
+ <xsl:when test="$UNICODEvsSYMBOL = 'symbol'">-</xsl:when>
+ <xsl:when test="$UNICODEvsSYMBOL = 'unicode'">-</xsl:when>
+ <xsl:otherwise>???</xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+<!--times-->
+ <xsl:variable name="times">
+ <xsl:choose>
+ <xsl:when test="$UNICODEvsSYMBOL = 'symbol'">*</xsl:when>
+ <xsl:when test="$UNICODEvsSYMBOL = 'unicode'">∗</xsl:when>
+ <xsl:otherwise>???</xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+<!--min-->
+ <xsl:variable name="min" select="'min'"/>
+<!--abs-->
+ <xsl:variable name="abs" select="'|'"/>
+<!-- LESS EQUAL -->
+ <xsl:template match="m:apply[m:leq[count(*) = 0] and count(*) = 3]">
+ <xsl:param name="current_indent" select="0"/>
+ <xsl:param name="width" select="$framewidth"/>
+ <xsl:variable name="charlength">
+ <xsl:apply-templates select="." mode="root_charcount"/>
+ </xsl:variable>
+ <xsl:choose>
+ <xsl:when test="$width >= $charlength">
+ <xsl:apply-templates select="." mode="inline"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:text>(</xsl:text>
+ <xsl:apply-templates select="*[2]">
+ <xsl:with-param name="current_indent" select="$current_indent + 2"/>
+ </xsl:apply-templates>
+ <BR/>
+ <xsl:call-template name="make_indent">
+ <xsl:with-param name="current_indent" select="$current_indent + 2"/>
+ </xsl:call-template>
+ <a href="{m:leq/@definitionURL}">
+ <xsl:choose>
+ <xsl:when test="boolean($leq)">
+ <xsl:call-template name="mksymbol">
+ <xsl:with-param name="symbol" select="$leq"/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:otherwise>leq</xsl:otherwise>
+ </xsl:choose>
+ </a>
+ <xsl:apply-templates select="*[3]">
+ <xsl:with-param name="current_indent" select="$current_indent + 2"/>
+ </xsl:apply-templates>
+ <xsl:text>)</xsl:text>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:template>
+<!-- LESS EQUAL (INLINE MODE) -->
+ <xsl:template match="m:apply[m:leq[count(*) = 0] and count(*) = 3]" mode="inline">
+ <xsl:text>(</xsl:text>
+ <xsl:apply-templates select="*[2]" mode="inline"/>
+ <a href="{m:leq/@definitionURL}">
+ <xsl:choose>
+ <xsl:when test="boolean($leq)">
+ <xsl:call-template name="mksymbol">
+ <xsl:with-param name="symbol" select="$leq"/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:otherwise>leq</xsl:otherwise>
+ </xsl:choose>
+ </a>
+ <xsl:apply-templates select="*[3]" mode="inline"/>
+ <xsl:text>)</xsl:text>
+ </xsl:template>
+<!-- LESS EQUAL (CHARCOUNT MODE) -->
+ <xsl:template match="m:apply[m:leq[count(*) = 0] and count(*) = 3]" mode="root_charcount">
+ <xsl:param name="incurrent_length" select="0"/>
+ <xsl:value-of select="$incurrent_length + 3"/>
+ </xsl:template>
+<!-- LESS THAN -->
+ <xsl:template match="m:apply[m:lt[count(*) = 0] and count(*) = 3]">
+ <xsl:param name="current_indent" select="0"/>
+ <xsl:param name="width" select="$framewidth"/>
+ <xsl:variable name="charlength">
+ <xsl:apply-templates select="." mode="root_charcount"/>
+ </xsl:variable>
+ <xsl:choose>
+ <xsl:when test="$width >= $charlength">
+ <xsl:apply-templates select="." mode="inline"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:text>(</xsl:text>
+ <xsl:apply-templates select="*[2]">
+ <xsl:with-param name="current_indent" select="$current_indent + 2"/>
+ </xsl:apply-templates>
+ <BR/>
+ <xsl:call-template name="make_indent">
+ <xsl:with-param name="current_indent" select="$current_indent + 2"/>
+ </xsl:call-template>
+ <a href="{m:lt/@definitionURL}">
+ <xsl:choose>
+ <xsl:when test="boolean($lt)">
+ <xsl:call-template name="mksymbol">
+ <xsl:with-param name="symbol" select="$lt"/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:otherwise>lt</xsl:otherwise>
+ </xsl:choose>
+ </a>
+ <xsl:apply-templates select="*[3]">
+ <xsl:with-param name="current_indent" select="$current_indent + 2"/>
+ </xsl:apply-templates>
+ <xsl:text>)</xsl:text>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:template>
+<!-- LESS THAN (INLINE MODE) -->
+ <xsl:template match="m:apply[m:lt[count(*) = 0] and count(*) = 3]" mode="inline">
+ <xsl:text>(</xsl:text>
+ <xsl:apply-templates select="*[2]" mode="inline"/>
+ <a href="{m:lt/@definitionURL}">
+ <xsl:choose>
+ <xsl:when test="boolean($lt)">
+ <xsl:call-template name="mksymbol">
+ <xsl:with-param name="symbol" select="$lt"/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:otherwise>lt</xsl:otherwise>
+ </xsl:choose>
+ </a>
+ <xsl:apply-templates select="*[3]" mode="inline"/>
+ <xsl:text>)</xsl:text>
+ </xsl:template>
+<!-- LESS THAN (CHARCOUNT MODE) -->
+ <xsl:template match="m:apply[m:lt[count(*) = 0] and count(*) = 3]" mode="root_charcount">
+ <xsl:param name="incurrent_length" select="0"/>
+ <xsl:value-of select="$incurrent_length + 3"/>
+ </xsl:template>
+<!-- GREATER EQUAL -->
+ <xsl:template match="m:apply[m:geq[count(*) = 0] and count(*) = 3]">
+ <xsl:param name="current_indent" select="0"/>
+ <xsl:param name="width" select="$framewidth"/>
+ <xsl:variable name="charlength">
+ <xsl:apply-templates select="." mode="root_charcount"/>
+ </xsl:variable>
+ <xsl:choose>
+ <xsl:when test="$width >= $charlength">
+ <xsl:apply-templates select="." mode="inline"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:text>(</xsl:text>
+ <xsl:apply-templates select="*[2]">
+ <xsl:with-param name="current_indent" select="$current_indent + 2"/>
+ </xsl:apply-templates>
+ <BR/>
+ <xsl:call-template name="make_indent">
+ <xsl:with-param name="current_indent" select="$current_indent + 2"/>
+ </xsl:call-template>
+ <a href="{m:geq/@definitionURL}">
+ <xsl:choose>
+ <xsl:when test="boolean($geq)">
+ <xsl:call-template name="mksymbol">
+ <xsl:with-param name="symbol" select="$geq"/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:otherwise>geq</xsl:otherwise>
+ </xsl:choose>
+ </a>
+ <xsl:apply-templates select="*[3]">
+ <xsl:with-param name="current_indent" select="$current_indent + 2"/>
+ </xsl:apply-templates>
+ <xsl:text>)</xsl:text>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:template>
+<!-- GREATER EQUAL (INLINE MODE) -->
+ <xsl:template match="m:apply[m:geq[count(*) = 0] and count(*) = 3]" mode="inline">
+ <xsl:text>(</xsl:text>
+ <xsl:apply-templates select="*[2]" mode="inline"/>
+ <a href="{m:geq/@definitionURL}">
+ <xsl:choose>
+ <xsl:when test="boolean($geq)">
+ <xsl:call-template name="mksymbol">
+ <xsl:with-param name="symbol" select="$geq"/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:otherwise>geq</xsl:otherwise>
+ </xsl:choose>
+ </a>
+ <xsl:apply-templates select="*[3]" mode="inline"/>
+ <xsl:text>)</xsl:text>
+ </xsl:template>
+<!-- GREATER EQUAL (CHARCOUNT MODE) -->
+ <xsl:template match="m:apply[m:geq[count(*) = 0] and count(*) = 3]" mode="root_charcount">
+ <xsl:param name="incurrent_length" select="0"/>
+ <xsl:value-of select="$incurrent_length + 3"/>
+ </xsl:template>
+<!-- GREATER THAN -->
+ <xsl:template match="m:apply[m:gt[count(*) = 0] and count(*) = 3]">
+ <xsl:param name="current_indent" select="0"/>
+ <xsl:param name="width" select="$framewidth"/>
+ <xsl:variable name="charlength">
+ <xsl:apply-templates select="." mode="root_charcount"/>
+ </xsl:variable>
+ <xsl:choose>
+ <xsl:when test="$width >= $charlength">
+ <xsl:apply-templates select="." mode="inline"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:text>(</xsl:text>
+ <xsl:apply-templates select="*[2]">
+ <xsl:with-param name="current_indent" select="$current_indent + 2"/>
+ </xsl:apply-templates>
+ <BR/>
+ <xsl:call-template name="make_indent">
+ <xsl:with-param name="current_indent" select="$current_indent + 2"/>
+ </xsl:call-template>
+ <a href="{m:gt/@definitionURL}">
+ <xsl:choose>
+ <xsl:when test="boolean($gt)">
+ <xsl:call-template name="mksymbol">
+ <xsl:with-param name="symbol" select="$gt"/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:otherwise>gt</xsl:otherwise>
+ </xsl:choose>
+ </a>
+ <xsl:apply-templates select="*[3]">
+ <xsl:with-param name="current_indent" select="$current_indent + 2"/>
+ </xsl:apply-templates>
+ <xsl:text>)</xsl:text>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:template>
+<!-- GREATER THAN (INLINE MODE) -->
+ <xsl:template match="m:apply[m:gt[count(*) = 0] and count(*) = 3]" mode="inline">
+ <xsl:text>(</xsl:text>
+ <xsl:apply-templates select="*[2]" mode="inline"/>
+ <a href="{m:gt/@definitionURL}">
+ <xsl:choose>
+ <xsl:when test="boolean($gt)">
+ <xsl:call-template name="mksymbol">
+ <xsl:with-param name="symbol" select="$gt"/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:otherwise>gt</xsl:otherwise>
+ </xsl:choose>
+ </a>
+ <xsl:apply-templates select="*[3]" mode="inline"/>
+ <xsl:text>)</xsl:text>
+ </xsl:template>
+<!-- GREATER THAN (CHARCOUNT MODE) -->
+ <xsl:template match="m:apply[m:gt[count(*) = 0] and count(*) = 3]" mode="root_charcount">
+ <xsl:param name="incurrent_length" select="0"/>
+ <xsl:value-of select="$incurrent_length + 3"/>
+ </xsl:template>
+<!-- PLUS -->
+ <xsl:template match="m:apply[m:plus[count(*) = 0] and count(*) = 3]">
+ <xsl:param name="current_indent" select="0"/>
+ <xsl:param name="width" select="$framewidth"/>
+ <xsl:variable name="charlength">
+ <xsl:apply-templates select="." mode="root_charcount"/>
+ </xsl:variable>
+ <xsl:choose>
+ <xsl:when test="$width >= $charlength">
+ <xsl:apply-templates select="." mode="inline"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:text>(</xsl:text>
+ <xsl:apply-templates select="*[2]">
+ <xsl:with-param name="current_indent" select="$current_indent + 2"/>
+ </xsl:apply-templates>
+ <BR/>
+ <xsl:call-template name="make_indent">
+ <xsl:with-param name="current_indent" select="$current_indent + 2"/>
+ </xsl:call-template>
+ <a href="{m:plus/@definitionURL}">
+ <xsl:choose>
+ <xsl:when test="boolean($plus)">
+ <xsl:call-template name="mksymbol">
+ <xsl:with-param name="symbol" select="$plus"/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:otherwise>plus</xsl:otherwise>
+ </xsl:choose>
+ </a>
+ <xsl:apply-templates select="*[3]">
+ <xsl:with-param name="current_indent" select="$current_indent + 2"/>
+ </xsl:apply-templates>
+ <xsl:text>)</xsl:text>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:template>
+<!-- PLUS (INLINE MODE) -->
+ <xsl:template match="m:apply[m:plus[count(*) = 0] and count(*) = 3]" mode="inline">
+ <xsl:text>(</xsl:text>
+ <xsl:apply-templates select="*[2]" mode="inline"/>
+ <a href="{m:plus/@definitionURL}">
+ <xsl:choose>
+ <xsl:when test="boolean($plus)">
+ <xsl:call-template name="mksymbol">
+ <xsl:with-param name="symbol" select="$plus"/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:otherwise>plus</xsl:otherwise>
+ </xsl:choose>
+ </a>
+ <xsl:apply-templates select="*[3]" mode="inline"/>
+ <xsl:text>)</xsl:text>
+ </xsl:template>
+<!-- PLUS (CHARCOUNT MODE) -->
+ <xsl:template match="m:apply[m:plus[count(*) = 0] and count(*) = 3]" mode="root_charcount">
+ <xsl:param name="incurrent_length" select="0"/>
+ <xsl:value-of select="$incurrent_length + 3"/>
+ </xsl:template>
+<!-- MINUS -->
+ <xsl:template match="m:apply[m:minus[count(*) = 0] and count(*) = 3]">
+ <xsl:param name="current_indent" select="0"/>
+ <xsl:param name="width" select="$framewidth"/>
+ <xsl:variable name="charlength">
+ <xsl:apply-templates select="." mode="root_charcount"/>
+ </xsl:variable>
+ <xsl:choose>
+ <xsl:when test="$width >= $charlength">
+ <xsl:apply-templates select="." mode="inline"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:text>(</xsl:text>
+ <xsl:apply-templates select="*[2]">
+ <xsl:with-param name="current_indent" select="$current_indent + 2"/>
+ </xsl:apply-templates>
+ <BR/>
+ <xsl:call-template name="make_indent">
+ <xsl:with-param name="current_indent" select="$current_indent + 2"/>
+ </xsl:call-template>
+ <a href="{m:minus/@definitionURL}">
+ <xsl:choose>
+ <xsl:when test="boolean($minus)">
+ <xsl:call-template name="mksymbol">
+ <xsl:with-param name="symbol" select="$minus"/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:otherwise>minus</xsl:otherwise>
+ </xsl:choose>
+ </a>
+ <xsl:apply-templates select="*[3]">
+ <xsl:with-param name="current_indent" select="$current_indent + 2"/>
+ </xsl:apply-templates>
+ <xsl:text>)</xsl:text>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:template>
+<!-- MINUS (INLINE MODE) -->
+ <xsl:template match="m:apply[m:minus[count(*) = 0] and count(*) = 3]" mode="inline">
+ <xsl:text>(</xsl:text>
+ <xsl:apply-templates select="*[2]" mode="inline"/>
+ <a href="{m:minus/@definitionURL}">
+ <xsl:choose>
+ <xsl:when test="boolean($minus)">
+ <xsl:call-template name="mksymbol">
+ <xsl:with-param name="symbol" select="$minus"/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:otherwise>minus</xsl:otherwise>
+ </xsl:choose>
+ </a>
+ <xsl:apply-templates select="*[3]" mode="inline"/>
+ <xsl:text>)</xsl:text>
+ </xsl:template>
+<!-- MINUS (CHARCOUNT MODE) -->
+ <xsl:template match="m:apply[m:minus[count(*) = 0] and count(*) = 3]" mode="root_charcount">
+ <xsl:param name="incurrent_length" select="0"/>
+ <xsl:value-of select="$incurrent_length + 3"/>
+ </xsl:template>
+<!-- TIMES -->
+ <xsl:template match="m:apply[m:times[count(*) = 0] and count(*) = 3]">
+ <xsl:param name="current_indent" select="0"/>
+ <xsl:param name="width" select="$framewidth"/>
+ <xsl:variable name="charlength">
+ <xsl:apply-templates select="." mode="root_charcount"/>
+ </xsl:variable>
+ <xsl:choose>
+ <xsl:when test="$width >= $charlength">
+ <xsl:apply-templates select="." mode="inline"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:text>(</xsl:text>
+ <xsl:apply-templates select="*[2]">
+ <xsl:with-param name="current_indent" select="$current_indent + 2"/>
+ </xsl:apply-templates>
+ <BR/>
+ <xsl:call-template name="make_indent">
+ <xsl:with-param name="current_indent" select="$current_indent + 2"/>
+ </xsl:call-template>
+ <a href="{m:times/@definitionURL}">
+ <xsl:choose>
+ <xsl:when test="boolean($times)">
+ <xsl:call-template name="mksymbol">
+ <xsl:with-param name="symbol" select="$times"/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:otherwise>times</xsl:otherwise>
+ </xsl:choose>
+ </a>
+ <xsl:apply-templates select="*[3]">
+ <xsl:with-param name="current_indent" select="$current_indent + 2"/>
+ </xsl:apply-templates>
+ <xsl:text>)</xsl:text>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:template>
+<!-- TIMES (INLINE MODE) -->
+ <xsl:template match="m:apply[m:times[count(*) = 0] and count(*) = 3]" mode="inline">
+ <xsl:text>(</xsl:text>
+ <xsl:apply-templates select="*[2]" mode="inline"/>
+ <a href="{m:times/@definitionURL}">
+ <xsl:choose>
+ <xsl:when test="boolean($times)">
+ <xsl:call-template name="mksymbol">
+ <xsl:with-param name="symbol" select="$times"/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:otherwise>times</xsl:otherwise>
+ </xsl:choose>
+ </a>
+ <xsl:apply-templates select="*[3]" mode="inline"/>
+ <xsl:text>)</xsl:text>
+ </xsl:template>
+<!-- TIMES (CHARCOUNT MODE) -->
+ <xsl:template match="m:apply[m:times[count(*) = 0] and count(*) = 3]" mode="root_charcount">
+ <xsl:param name="incurrent_length" select="0"/>
+ <xsl:value-of select="$incurrent_length + 3"/>
+ </xsl:template>
+<!-- MIN -->
+ <xsl:template match="m:apply[m:min[count(*) = 0] and count(*) = 3]">
+ <xsl:param name="current_indent" select="0"/>
+ <xsl:param name="width" select="$framewidth"/>
+ <xsl:variable name="charlength">
+ <xsl:apply-templates select="." mode="root_charcount"/>
+ </xsl:variable>
+ <xsl:choose>
+ <xsl:when test="$width >= $charlength">
+ <xsl:apply-templates select="." mode="inline"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <a href="{m:min/@definitionURL}">
+ <xsl:choose>
+ <xsl:when test="boolean($min)">
+ <xsl:call-template name="mksymbol">
+ <xsl:with-param name="symbol" select="$min"/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:otherwise>min</xsl:otherwise>
+ </xsl:choose>
+ </a>
+ <xsl:text>{</xsl:text>
+ <xsl:apply-templates select="*[2]">
+ <xsl:with-param name="current_indent" select="$current_indent + 2"/>
+ </xsl:apply-templates>
+ <xsl:text>,</xsl:text>
+ <BR/>
+ <xsl:call-template name="make_indent">
+ <xsl:with-param name="current_indent" select="$current_indent + 2"/>
+ </xsl:call-template>
+ <xsl:apply-templates select="*[3]">
+ <xsl:with-param name="current_indent" select="$current_indent + 2"/>
+ </xsl:apply-templates>
+ <xsl:text>}</xsl:text>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:template>
+<!-- MIN (INLINE MODE) -->
+ <xsl:template match="m:apply[m:min[count(*) = 0] and count(*) = 3]" mode="inline">
+ <a href="{m:min/@definitionURL}">
+ <xsl:choose>
+ <xsl:when test="boolean($min)">
+ <xsl:call-template name="mksymbol">
+ <xsl:with-param name="symbol" select="$min"/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:otherwise>min</xsl:otherwise>
+ </xsl:choose>
+ </a>
+ <xsl:text>{</xsl:text>
+ <xsl:apply-templates select="*[2]" mode="inline"/>
+ <xsl:text>,</xsl:text>
+ <xsl:apply-templates select="*[3]" mode="inline"/>
+ <xsl:text>}</xsl:text>
+ </xsl:template>
+<!-- MIN (CHARCOUNT MODE) -->
+ <xsl:template match="m:apply[m:min[count(*) = 0] and count(*) = 3]" mode="root_charcount">
+ <xsl:param name="incurrent_length" select="0"/>
+ <xsl:value-of select="$incurrent_length + 4"/>
+ </xsl:template>
+<!-- MINUS -->
+ <xsl:template match="m:apply[m:minus[count(*) = 0] and count(*) = 2]">
+ <xsl:param name="current_indent" select="0"/>
+ <xsl:param name="width" select="$framewidth"/>
+ <a href="{m:minus/@definitionURL}">
+ <xsl:choose>
+ <xsl:when test="boolean($minus)">
+ <xsl:call-template name="mksymbol">
+ <xsl:with-param name="symbol" select="$minus"/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:otherwise>minus</xsl:otherwise>
+ </xsl:choose>
+ </a>
+ <xsl:apply-templates select="*[2]">
+ <xsl:with-param name="current_indent" select="$current_indent + 2"/>
+ </xsl:apply-templates>
+ </xsl:template>
+<!-- MINUS (INLINE MODE) -->
+ <xsl:template match="m:apply[m:minus[count(*) = 0] and count(*) = 2]" mode="inline">
+ <a href="{m:minus/@definitionURL}">
+ <xsl:choose>
+ <xsl:when test="boolean($minus)">
+ <xsl:call-template name="mksymbol">
+ <xsl:with-param name="symbol" select="$minus"/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:otherwise>minus</xsl:otherwise>
+ </xsl:choose>
+ </a>
+ <xsl:apply-templates select="*[2]" mode="inline"/>
+ </xsl:template>
+<!-- MINUS (CHARCOUNT MODE) -->
+ <xsl:template match="m:apply[m:minus[count(*) = 0] and count(*) = 2]" mode="root_charcount">
+ <xsl:param name="incurrent_length" select="0"/>
+ <xsl:value-of select="$incurrent_length + 1"/>
+ </xsl:template>
+<!-- ABSOLUTE VALUE -->
+ <xsl:template match="m:apply[m:abs[count(*) = 0] and count(*) = 2]">
+ <xsl:param name="current_indent" select="0"/>
+ <xsl:param name="width" select="$framewidth"/>
+ <a href="{m:abs/@definitionURL}">
+ <xsl:choose>
+ <xsl:when test="boolean($abs)">
+ <xsl:call-template name="mksymbol">
+ <xsl:with-param name="symbol" select="$abs"/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:otherwise>abs</xsl:otherwise>
+ </xsl:choose>
+ </a>
+ <xsl:apply-templates select="*[2]">
+ <xsl:with-param name="current_indent" select="$current_indent + 2"/>
+ </xsl:apply-templates>
+ <a href="{m:abs/@definitionURL}">
+ <xsl:choose>
+ <xsl:when test="boolean($abs)">
+ <xsl:call-template name="mksymbol">
+ <xsl:with-param name="symbol" select="$abs"/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:otherwise>abs</xsl:otherwise>
+ </xsl:choose>
+ </a>
+ </xsl:template>
+<!-- ABSOLUTE VALUE (INLINE MODE) -->
+ <xsl:template match="m:apply[m:abs[count(*) = 0] and count(*) = 2]" mode="inline">
+ <a href="{m:abs/@definitionURL}">
+ <xsl:choose>
+ <xsl:when test="boolean($abs)">
+ <xsl:call-template name="mksymbol">
+ <xsl:with-param name="symbol" select="$abs"/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:otherwise>abs</xsl:otherwise>
+ </xsl:choose>
+ </a>
+ <xsl:apply-templates select="*[2]" mode="inline"/>
+ <a href="{m:abs/@definitionURL}">
+ <xsl:choose>
+ <xsl:when test="boolean($abs)">
+ <xsl:call-template name="mksymbol">
+ <xsl:with-param name="symbol" select="$abs"/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:otherwise>abs</xsl:otherwise>
+ </xsl:choose>
+ </a>
+ </xsl:template>
+<!-- ABSOLUTE VALUE (CHARCOUNT MODE) -->
+ <xsl:template match="m:apply[m:abs[count(*) = 0] and count(*) = 2]" mode="root_charcount">
+ <xsl:param name="incurrent_length" select="0"/>
+ <xsl:value-of select="$incurrent_length + 2"/>
+ </xsl:template>
+</xsl:stylesheet>