<!-- HELM Group: Asperti, Padovani, Sacerdoti, Schena -->
<!--***********************************************************************-->
+<xsl:template name="mksymbol-reals">
+ <xsl:param name="symbol" select="''"/>
+ <xsl:choose>
+ <xsl:when test="$UNICODEvsSYMBOL = 'symbol'">
+ <xsl:variable name="fontsymbol">
+ <xsl:choose>
+ <xsl:when test="$symbol = 'leadsto'">
+ <xsl:value-of select="'®'"/>
+ </xsl:when>
+ <xsl:when test="$symbol = 'sum'">
+ <xsl:value-of select="'å'"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:text>???</xsl:text>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+ <FONT FACE="symbol" color="'blue'">
+ <xsl:value-of select="$fontsymbol"/>
+ </FONT>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:variable name="unicodesymbol">
+ <xsl:choose>
+ <xsl:when test="$symbol = 'leadsto'">
+ <xsl:value-of select="'→'"/>
+ </xsl:when>
+ <xsl:when test="$symbol = 'sum'">
+ <xsl:value-of select="'∑'"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:text>???</xsl:text>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+ <FONT color="'blue'">
+ <xsl:value-of select="$unicodesymbol"/>
+ </FONT>
+ </xsl:otherwise>
+ </xsl:choose>
+</xsl:template>
+
<!-- **************************************************************** -->
<!-- INLINE MODE -->
<!-- **************************************************************** -->
-<!-- LIMIT -->
+<!-- SUM -->
-
-<xsl:template mode="inline" match="m:apply[m:limit]">
+<xsl:template mode="inline" match="m:apply[m:sum]">
<xsl:variable name="uri">
- <xsl:value-of select="m:limit/@definitionURL"/>
+ <xsl:value-of select="m:sum/@definitionURL"/>
</xsl:variable>
- <a>
- <xsl:attribute name="href">
- <xsl:call-template name="makeURL">
- <xsl:with-param name="url" select="$uri"/>
+ <xsl:choose>
+ <xsl:when test="$uri != ''">
+ <a href="{$uri}">
+ <!--
+ <FONT FACE="symbol" color="'blue'">
+ <xsl:value-of select="'å'"/>
+ </FONT> -->
+ <xsl:call-template name="mksymbol-reals">
+ <xsl:with-param name="symbol" select="'sum'"/>
</xsl:call-template>
- </xsl:attribute>
- <xsl:text>lim</xsl:text>
- </a>
+ </a>
+ </xsl:when>
+ <xsl:otherwise>
+ <!--
+ <FONT FACE="symbol" color="'blue'">
+ <xsl:value-of select="'å'"/>
+ </FONT> -->
+ <xsl:call-template name="mksymbol-reals">
+ <xsl:with-param name="symbol" select="'sum'"/>
+ </xsl:call-template>
+ </xsl:otherwise>
+ </xsl:choose>
+ <xsl:choose>
+ <xsl:when test="m:condition">
+ <SUB>
+ <xsl:apply-templates select="m:condition"/>
+ </SUB>
+ </xsl:when>
+ <xsl:otherwise>
+ <SUB>
+ <xsl:apply-templates select="m:lowlimit/*[1]"/>
+ <xsl:call-template name="mksymbol-init">
+ <xsl:with-param name="symbol" select="'leq'"/>
+ </xsl:call-template>
+ <xsl:apply-templates select="m:bvar/*[1]"/>
+ <xsl:call-template name="mksymbol-init">
+ <xsl:with-param name="symbol" select="'leq'"/>
+ </xsl:call-template>
+ <xsl:apply-templates select="m:uplimit/*[1]"/>
+ </SUB>
+ </xsl:otherwise>
+ </xsl:choose>
+ <xsl:apply-templates mode="inline" select="*[position()=last()]"/>
+ </xsl:template>
+
+
+<!-- LIMIT -->
+
+
+<xsl:template mode="inline" match="m:apply[m:limit]">
+ <xsl:variable name="uri"><xsl:value-of select="m:limit/@definitionURL"/></xsl:variable>
+ <xsl:choose>
+ <xsl:when test="$uri != ''">
+ <a href="{$uri}">
+ <xsl:text>lim</xsl:text>
+ </a>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:text>lim</xsl:text>
+ </xsl:otherwise>
+ </xsl:choose>
<SUB>
<xsl:apply-templates select="m:bvar/m:ci"/>
- <FONT FACE="symbol" mathcolor="blue">®</FONT>
+ <xsl:call-template name="mksymbol-reals">
+ <xsl:with-param name="symbol" select="'leadsto'"/>
+ </xsl:call-template>
<xsl:apply-templates mode="inline" select="m:lowlimit"/>
</SUB>
<xsl:apply-templates mode="inline" select="*[4]"/>
<!-- DIFFERENTIATION -->
<xsl:template mode="inline" match="m:apply[m:diff]">
- <xsl:variable name="uri">
- <xsl:value-of select="m:diff/@definitionURL"/>
- </xsl:variable>
- <a>
- <xsl:attribute name="href">
- <xsl:call-template name="makeURL">
- <xsl:with-param name="url" select="$uri"/>
- </xsl:call-template>
- </xsl:attribute>
- <SUP>d</SUP>
- <xsl:text>/</xsl:text>
- <SUB>
- <xsl:text>d</xsl:text>
- <xsl:value-of select="m:bvar/m:ci"/>
- </SUB>
- </a>
+ <xsl:variable name="uri"><xsl:value-of select="m:diff/@definitionURL"/></xsl:variable>
+ <xsl:choose>
+ <xsl:when test="$uri != ''">
+ <a href="{$uri}">
+ <SUP>d</SUP>
+ <xsl:text>/</xsl:text>
+ <SUB>
+ <xsl:text>d</xsl:text>
+ <xsl:value-of select="m:bvar/m:ci"/>
+ </SUB>
+ </a>
+ </xsl:when>
+ <xsl:otherwise>
+ <SUP>d</SUP>
+ <xsl:text>/</xsl:text>
+ <SUB>
+ <xsl:text>d</xsl:text>
+ <xsl:value-of select="m:bvar/m:ci"/>
+ </SUB>
+ </xsl:otherwise>
+ </xsl:choose>
<xsl:apply-templates mode="inline" select="*[3]"/>
</xsl:template>
<!-- MIN and MAX (binari: estendere) -->
<xsl:template mode="inline" match="m:apply[m:min|m:max]">
- <xsl:variable name="uri">
- <xsl:value-of select="*[1]/@definitionURL"/>
- </xsl:variable>
+ <xsl:variable name="uri"><xsl:value-of select="*[1]/@definitionURL"/></xsl:variable>
<xsl:variable name="symbol">
<xsl:choose>
<xsl:when test="m:min">
</xsl:when>
</xsl:choose>
</xsl:variable>
- <a>
- <xsl:attribute name="href">
- <xsl:call-template name="makeURL">
- <xsl:with-param name="url" select="$uri"/>
- </xsl:call-template>
- </xsl:attribute>
+ <xsl:choose>
+ <xsl:when test="$uri != ''">
+ <a href="{$uri}">
+ <xsl:value-of select="$symbol"/>
+ </a>
+ </xsl:when>
+ <xsl:otherwise>
<xsl:value-of select="$symbol"/>
- </a>
+ </xsl:otherwise>
+ </xsl:choose>
<xsl:text>{</xsl:text>
<xsl:apply-templates mode="inline" select="*[2]"/>
<xsl:text>, </xsl:text>
<!-- COUNTING MODE -->
<!-- **************************************************************** -->
+<xsl:template match="m:apply[m:sum]">
+ <xsl:apply-templates mode="inline" select="."/>
+</xsl:template>
<xsl:template match="m:apply[m:limit]">
<xsl:param name="current_indent" select="0"/>
<xsl:param name="width" select="$framewidth"/>
- <xsl:variable name="uri">
- <xsl:value-of select="m:limit/@definitionURL"/>
- </xsl:variable>
+ <xsl:variable name="uri"><xsl:value-of select="m:limit/@definitionURL"/></xsl:variable>
<xsl:variable name="charlength">
<xsl:apply-templates select="m:limit" mode="charcount"/>
</xsl:variable>
<xsl:choose>
<xsl:when test="$charlength > $framewidth">
- <a>
- <xsl:attribute name="href">
- <xsl:call-template name="makeURL">
- <xsl:with-param name="url" select="$uri"/>
- </xsl:call-template>
- </xsl:attribute>
- <xsl:text>lim</xsl:text>
- </a>
+ <xsl:choose>
+ <xsl:when test="$uri != ''">
+ <a href="{$uri}">
+ <xsl:text>lim</xsl:text>
+ </a>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:text>lim</xsl:text>
+ </xsl:otherwise>
+ </xsl:choose>
<SUB>
<xsl:apply-templates select="m:bvar/m:ci"/>
- <FONT FACE="symbol" mathcolor="blue">®</FONT>
+ <xsl:call-template name="mksymbol-reals">
+ <xsl:with-param name="symbol" select="'leadsto'"/>
+ </xsl:call-template>
<xsl:apply-templates select="m:lowlimit"/>
</SUB>
<BR/>
<xsl:template match="m:apply[m:diff]">
<xsl:param name="current_indent" select="0"/>
<xsl:param name="width" select="$framewidth"/>
- <xsl:variable name="uri">
- <xsl:value-of select="m:diff/@definitionURL"/>
- </xsl:variable>
- <a>
- <xsl:attribute name="href">
- <xsl:call-template name="makeURL">
- <xsl:with-param name="url" select="$uri"/>
- </xsl:call-template>
- </xsl:attribute>
- <SUP>d</SUP>
- <xsl:text>/</xsl:text>
- <SUB>
- <xsl:text>d</xsl:text>
- <xsl:value-of select="m:bvar/m:ci"/>
- </SUB>
- </a>
+ <xsl:variable name="uri"><xsl:value-of select="m:diff/@definitionURL"/></xsl:variable>
+ <xsl:choose>
+ <xsl:when test="$uri != ''">
+ <a href="{$uri}">
+ <SUP>d</SUP>
+ <xsl:text>/</xsl:text>
+ <SUB>
+ <xsl:text>d</xsl:text>
+ <xsl:value-of select="m:bvar/m:ci"/>
+ </SUB>
+ </a>
+ </xsl:when>
+ <xsl:otherwise>
+ <SUP>d</SUP>
+ <xsl:text>/</xsl:text>
+ <SUB>
+ <xsl:text>d</xsl:text>
+ <xsl:value-of select="m:bvar/m:ci"/>
+ </SUB>
+ </xsl:otherwise>
+ </xsl:choose>
<xsl:apply-templates select="*[3]">
<xsl:with-param name="current_indent" select="$current_indent + 5"/>
</xsl:apply-templates>
<xsl:template match="m:apply[m:min|m:max]">
<xsl:param name="current_indent" select="0"/>
<xsl:param name="width" select="$framewidth"/>
- <xsl:variable name="uri">
- <xsl:value-of select="*[1]/@definitionURL"/>
- </xsl:variable>
+ <xsl:variable name="uri"><xsl:value-of select="*[1]/@definitionURL"/></xsl:variable>
<xsl:variable name="charlength">
<xsl:apply-templates select="*[1]" mode="charcount"/>
</xsl:variable>
</xsl:variable>
<xsl:choose>
<xsl:when test="$charlength > $framewidth">
- <a>
- <xsl:attribute name="href">
- <xsl:call-template name="makeURL">
- <xsl:with-param name="url" select="$uri"/>
- </xsl:call-template>
- </xsl:attribute>
- <xsl:value-of select="$symbol"/>
- </a>
+ <xsl:choose>
+ <xsl:when test="$uri != ''">
+ <a href="{$uri}">
+ <xsl:value-of select="$symbol"/>
+ </a>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="$symbol"/>
+ </xsl:otherwise>
+ </xsl:choose>
<xsl:text>{</xsl:text>
<xsl:apply-templates select="*[2]">
<xsl:with-param name="current_indent" select="$current_indent + 2"/>
<!-- COUNTING -->
-<xsl:template match="m:abs|m:fact|m:root
- |m:limit|m:diff|m:min|m:max" mode="charcount">
+<xsl:template match="m:abs|m:fact|m:root|
+ m:sum|m:limit|m:diff|m:min|m:max" mode="charcount">
<xsl:param name="incurrent_length" select="0"/>
<xsl:choose>
<xsl:when test="$framewidth >= ($incurrent_length + string-length())">
</xsl:template>
</xsl:stylesheet>
-
-
-
-
-
-
-