<xsl:param name="CICURI" select="''"/>
<xsl:param name="type" select="'standalone'"/>
+<xsl:param name="UNICODEvsSYMBOL" select="'symbol'"/>
<xsl:include href="html_init.xsl"/>
<xsl:include href="html_set.xsl"/>
<xsl:variable name="framewidth" select="45"/>
+<xsl:template name="mksymbol-1">
+ <xsl:param name="symbol" select="''"/>
+ <xsl:param name="color" select="''"/>
+ <xsl:param name="size" select="''"/>
+ <xsl:choose>
+ <xsl:when test="$UNICODEvsSYMBOL = 'symbol'">
+ <xsl:variable name="fontsymbol">
+ <xsl:choose>
+ <xsl:when test="$symbol = 'forall'">
+ <xsl:value-of select="'"'"/>
+ </xsl:when>
+ <xsl:when test="$symbol = 'lambda'">
+ <xsl:value-of select="'l'"/>
+ </xsl:when>
+ <xsl:when test="$symbol = 'prod'">
+ <xsl:value-of select="'Õ'"/>
+ </xsl:when>
+ <xsl:when test="$symbol = 'arrow'">
+ <xsl:value-of select="'®'"/>
+ </xsl:when>
+ </xsl:choose>
+ </xsl:variable>
+ <FONT FACE="symbol" SIZE="{$size}" mathcolor="{$color}">
+ <xsl:value-of select="$fontsymbol"/>
+ </FONT>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:variable name="unicodesymbol">
+ <xsl:choose>
+ <xsl:when test="$symbol = 'forall'">
+ <xsl:value-of select="'∀'"/>
+ </xsl:when>
+ <xsl:when test="$symbol = 'lambda'">
+ <xsl:value-of select="'λ'"/>
+ </xsl:when>
+ <xsl:when test="$symbol = 'prod'">
+ <xsl:value-of select="'Π'"/>
+ </xsl:when>
+ <xsl:when test="$symbol = 'arrow'">
+ <xsl:value-of select="'→'"/>
+ </xsl:when>
+ </xsl:choose>
+ </xsl:variable>
+ <FONT color="{$color}">
+ <xsl:value-of select="$unicodesymbol"/>
+ </FONT>
+ </xsl:otherwise>
+ </xsl:choose>
+</xsl:template>
+
<xsl:template match="/">
<xsl:param name="current_indent" select="0"/>
<xsl:choose>
<xsl:choose>
<!-- FORALL -->
<xsl:when test="$name='forall'">
- <FONT FACE="Symbol" SIZE="+2" color="blue">"</FONT>
+ <xsl:call-template name="mksymbol-1">
+ <xsl:with-param name="symbol" select="$name"/>
+ <xsl:with-param name="color" select="'blue'"/>
+ <xsl:with-param name="size" select="'+2'"/>
+ </xsl:call-template>
<xsl:apply-templates select="m:bvar/m:ci"/>
<xsl:text>:</xsl:text>
<xsl:apply-templates mode="inline" select="m:bvar/m:type"/>
<xsl:apply-templates mode="inline" select="*[position()=3]"/>
</xsl:when>
<xsl:when test="$name='prod'">
- <FONT FACE="Symbol" SIZE="+2" color="blue">Õ</FONT>
+ <xsl:call-template name="mksymbol-1">
+ <xsl:with-param name="symbol" select="$name"/>
+ <xsl:with-param name="color" select="'blue'"/>
+ <xsl:with-param name="size" select="'+2'"/>
+ </xsl:call-template>
<xsl:apply-templates mode="inline" select="m:bvar/m:ci"/>
<xsl:text>:</xsl:text>
<xsl:apply-templates mode="inline" select="m:bvar/m:type"/>
<xsl:when test="$name='arrow'">
<xsl:text>(</xsl:text>
<xsl:apply-templates mode="inline" select="*[position()=2]"/>
- <FONT color="blue" SIZE="+0" FACE="symbol">
- <xsl:text>®</xsl:text>
- </FONT>
+ <xsl:call-template name="mksymbol-1">
+ <xsl:with-param name="symbol" select="$name"/>
+ <xsl:with-param name="color" select="'blue'"/>
+ <xsl:with-param name="size" select="'+0'"/>
+ </xsl:call-template>
<xsl:apply-templates mode="inline" select="*[position()=3]"/>
<xsl:text>)</xsl:text>
</xsl:when>
</xsl:template>
<xsl:template mode="inline" match="m:lambda">
- <FONT SIZE="+2" color="red" FACE="symbol">l</FONT>
+ <xsl:call-template name="mksymbol-1">
+ <xsl:with-param name="symbol" select="'lambda'"/>
+ <xsl:with-param name="color" select="'red'"/>
+ <xsl:with-param name="size" select="'+2'"/>
+ </xsl:call-template>
<xsl:apply-templates select="m:bvar/m:ci"/>
<xsl:text>:</xsl:text>
<xsl:apply-templates mode="inline" select="m:bvar/m:type"/>
<xsl:choose>
<xsl:when test="$charlength > $framewidth">
<!-- Π -->
- <FONT FACE="Symbol" SIZE="+2" color="blue">"</FONT>
+ <xsl:call-template name="mksymbol-1">
+ <xsl:with-param name="symbol" select="$name"/>
+ <xsl:with-param name="color" select="'blue'"/>
+ <xsl:with-param name="size" select="'+2'"/>
+ </xsl:call-template>
<xsl:apply-templates select="m:bvar/m:ci"/>
<xsl:text>:</xsl:text>
<xsl:apply-templates select="m:bvar/m:type">
<xsl:when test="$name='prod'">
<xsl:choose>
<xsl:when test="$charlength > $framewidth">
- <FONT FACE="Symbol" SIZE="+2" color="blue">Õ</FONT>
+ <xsl:call-template name="mksymbol-1">
+ <xsl:with-param name="symbol" select="$name"/>
+ <xsl:with-param name="color" select="'blue'"/>
+ <xsl:with-param name="size" select="'+2'"/>
+ </xsl:call-template>
<xsl:apply-templates select="m:bvar/m:ci"/>
<xsl:text>:</xsl:text>
<xsl:apply-templates select="m:bvar/m:type">
<xsl:with-param name="current_indent" select="$current_indent + 2"/>
</xsl:call-template>
<!-- -> -->
- <FONT color="blue" SIZE="+0" FACE="symbol">
- <xsl:text>®</xsl:text>
- </FONT>
+ <xsl:call-template name="mksymbol-1">
+ <xsl:with-param name="symbol" select="$name"/>
+ <xsl:with-param name="color" select="'blue'"/>
+ <xsl:with-param name="size" select="'+2'"/>
+ </xsl:call-template>
<xsl:apply-templates select="*[position()=3]">
<xsl:with-param name="current_indent" select="$current_indent + 5"/>
</xsl:apply-templates>
<xsl:choose>
<xsl:when test="$charlength > $framewidth">
<!-- λ -->
- <FONT SIZE="+2" color="red" FACE="symbol">l</FONT>
+ <xsl:call-template name="mksymbol-1">
+ <xsl:with-param name="symbol" select="'lambda'"/>
+ <xsl:with-param name="color" select="'red'"/>
+ <xsl:with-param name="size" select="'+2'"/>
+ </xsl:call-template>
<xsl:apply-templates select="m:bvar/m:ci"/>
<xsl:text>:</xsl:text>
<xsl:apply-templates select="m:bvar/m:type">
<!-- HELM Group: Asperti, Padovani, Sacerdoti, Schena -->
<!--***********************************************************************-->
+<xsl:template name="mksymbol">
+ <xsl:param name="symbol" select="''"/>
+ <xsl:choose>
+ <xsl:when test="$UNICODEvsSYMBOL = 'symbol'">
+ <xsl:variable name="fontsymbol">
+ <xsl:choose>
+ <xsl:when test="$symbol = 'emptyset'">
+ <xsl:value-of select="'Æ'"/>
+ </xsl:when>
+ <xsl:when test="$symbol = 'in'">
+ <xsl:value-of select="'Î'"/>
+ </xsl:when>
+ <xsl:when test="$symbol = 'notin'">
+ <xsl:value-of select="'Ï'"/>
+ </xsl:when>
+ <xsl:when test="$symbol = 'intersect'">
+ <xsl:value-of select="'Ç'"/>
+ </xsl:when>
+ <xsl:when test="$symbol = 'union'">
+ <xsl:value-of select="'È'"/>
+ </xsl:when>
+ <xsl:when test="$symbol = 'subset'">
+ <xsl:value-of select="'Í'"/>
+ </xsl:when>
+ <xsl:when test="$symbol = 'prsubset'">
+ <xsl:value-of select="'Ì'"/>
+ </xsl:when>
+ <xsl:when test="$symbol = 'setdiff'">
+ <xsl:value-of select="'/'"/>
+ </xsl:when>
+ </xsl:choose>
+ </xsl:variable>
+ <FONT FACE="symbol" SIZE="+0" mathcolor="blue">
+ <xsl:value-of select="$fontsymbol"/>
+ </FONT>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:variable name="unicodesymbol">
+ <xsl:choose>
+ <xsl:when test="$symbol = 'emptyset'">
+ <xsl:value-of select="'∅'"/>
+ </xsl:when>
+ <xsl:when test="$symbol = 'in'">
+ <xsl:value-of select="'∈'"/>
+ </xsl:when>
+ <xsl:when test="$symbol = 'notin'">
+ <xsl:value-of select="'∉'"/>
+ </xsl:when>
+ <xsl:when test="$symbol = 'intersect'">
+ <xsl:value-of select="'∩'"/>
+ </xsl:when>
+ <xsl:when test="$symbol = 'union'">
+ <xsl:value-of select="'∪'"/>
+ </xsl:when>
+ <xsl:when test="$symbol = 'subset'">
+ <xsl:value-of select="'⊆'"/>
+ </xsl:when>
+ <xsl:when test="$symbol = 'prsubset'">
+ <xsl:value-of select="'⊂'"/>
+ </xsl:when>
+ <xsl:when test="$symbol = 'setdiff'">
+ <xsl:value-of select="'/'"/>
+ </xsl:when>
+ </xsl:choose>
+ </xsl:variable>
+ <xsl:value-of select="$unicodesymbol"/>
+ </xsl:otherwise>
+ </xsl:choose>
+</xsl:template>
+
<!-- **************************************************************** -->
<!-- INLINE MODE -->
<!-- **************************************************************** -->
</xsl:variable>-->
<xsl:choose>
<xsl:when test="count(child::*) = 0">
- <FONT FACE="symbol" SIZE="+0" mathcolor="blue">Æ</FONT>
+ <xsl:call-template name="mksymbol">
+ <xsl:with-param name="symbol" select="'emptyset'"/>
+ </xsl:call-template>
</xsl:when>
<xsl:otherwise>
<xsl:choose>
<xsl:text>(</xsl:text>
<xsl:apply-templates mode="inline" select="*[2]"/>
<a href="{$uri}">
- <FONT FACE="symbol" SIZE="+0" mathcolor="blue">
- <xsl:value-of select="$symbol"/>
- </FONT>
+ <xsl:call-template name="mksymbol">
+ <xsl:with-param name="symbol">
+ <xsl:value-of select="local-name(*[1])"/>
+ </xsl:with-param>
+ </xsl:call-template>
</a>
<xsl:apply-templates mode="inline" select="*[3]"/>
<xsl:text>)</xsl:text>
<xsl:with-param name="current_indent" select="$current_indent + 2"/>
</xsl:call-template>
<a href="{$uri}">
- <FONT FACE="symbol" SIZE="+0" mathcolor="blue">
- <xsl:value-of select="$symbol"/>
- </FONT>
+ <xsl:call-template name="mksymbol">
+ <xsl:with-param name="symbol">
+ <xsl:value-of select="local-name(*[1])"/>
+ </xsl:with-param>
+ </xsl:call-template>
</a>
<xsl:apply-templates select="*[3]">
<xsl:with-param name="current_indent" select="$current_indent + 2"/>
</xsl:variable>-->
<xsl:choose>
<xsl:when test="count(child::*) = 0">
- <FONT FACE="symbol" SIZE="+0" mathcolor="blue">Æ</FONT>
+ <xsl:call-template name="mksymbol">
+ <xsl:with-param name="symbol" select="'emptyset'"/>
+ </xsl:call-template>
</xsl:when>
<xsl:otherwise>
<xsl:variable name="charlength">