<!-- ====================================================== -->
<!-- June, 2000 - HELM group: -->
-<!-- Added auxiliary function to inser: -->
+<!-- Added auxiliary function to insert: -->
<!-- 1) backwards pointers: helm:xref -->
<!-- 2) references to definitions: xlink:href -->
<!-- Added call-templates to the functions: -->
<!-- BASIC ELEMENTS -->
+<!-- HELM: cn could not contain MAthMl presentation -->
<xsl:template match = "m:cn">
<xsl:param name="IN_PREC" select="$NO_PREC"/>
<xsl:param name="PAREN" select="$PAR_NO"/>
<xsl:param name="PAR_NO_IGNORE" select="$YES"/>
+<!-- HELM: added -->
+<xsl:choose>
+ <xsl:when test="child::text()">
+<!-- HELM -->
<xsl:choose>
<xsl:when test=". < 0 and $IN_PREC > 0 and $PAREN=$PAR_NO and $PAR_NO_IGNORE=$NO">
<m:mfenced separators="">
<xsl:apply-templates select="." mode="cn"/>
</xsl:otherwise>
</xsl:choose>
+<!-- HELM: added -->
+</xsl:when>
+ <xsl:otherwise>
+ <xsl:copy-of select="*"/>
+ </xsl:otherwise>
+ </xsl:choose>
+<!-- HELM -->
</xsl:template>
<xsl:template match = "m:cn" mode="cn">
<m:mi fontweight="bold"> <xsl:apply-templates mode = "semantics"/> </m:mi>
</xsl:when>
<xsl:otherwise>
-<!-- <CSC> Originale:
+<!-- HELM: ci could not contain MathML presentation
<m:mi>
<xsl:call-template name="insert"/>
<xsl:apply-templates mode = "semantics"/>
</m:mi>
-</CSC> -->
-<!-- <CSC> Modificato: -->
+-->
<xsl:choose>
+ <!-- HELM: or the opposite test <xsl:when test="*[1]"> -->
<xsl:when test="child::text()">
<m:mi>
<xsl:call-template name="insert"/>
</m:mi>
</xsl:when>
<xsl:otherwise>
- <xsl:copy-of select="*"/>
+ <m:mrow>
+ <xsl:call-template name="insert"/>
+ <xsl:copy-of select="*"/>
+ </m:mrow>
</xsl:otherwise>
</xsl:choose>
-<!-- </CSC> -->
</xsl:otherwise>
</xsl:choose>
</xsl:template>
+
<xsl:template match = "m:csymbol">
- <xsl:choose>
+ <xsl:choose>
<xsl:when test="*[1]">
- <xsl:copy-of select = "*"/>
+ <xsl:copy-of select = "*"/>
</xsl:when>
- <xsl:otherwise>
- <m:mo> <xsl:apply-templates mode = "semantics"/> </m:mo>
- </xsl:otherwise>
+ <xsl:otherwise>
+ <m:mo> <xsl:apply-templates mode = "semantics"/> </m:mo>
+ </xsl:otherwise>
</xsl:choose>
</xsl:template>
</xsl:apply-templates>
<xsl:if test="*[3]">
<xsl:for-each select = "*[position()>2]">
-<!-- HELM: MODIFICA PROVVISORIA -->
+<!-- HELM: to distinguish between * and the application -->
<!-- <m:mo><xsl:call-template name="insert2"/>
<mchar name="InvisibleTimes"/> </m:mo> -->
<m:mo><xsl:call-template name="insert2"/>*</m:mo>
</xsl:if>
</xsl:template>
-<!-- HELM: COMMENTO : dove metto la uri della definizione di radice ???? -->
<xsl:template match = "m:apply[m:root[1]]">
<m:msqrt>
+ <xsl:call-template name="insert1"/>
<xsl:call-template name="insert_xref"/>
<xsl:if test="*[2]=m:degree">
<xsl:apply-templates select="*[3]" mode = "semantics"/>
<xsl:template match = "m:apply[m:not[1]]">
<m:mrow>
<xsl:call-template name="insert_xref"/>
+<!-- CSC, per estetica!
<m:mo><xsl:call-template name="insert1"/>not</m:mo>
+-->
+ <m:mo><xsl:call-template name="insert1"/><m:mchar name="not"/></m:mo>
<xsl:apply-templates select = "*[2]" mode = "semantics">
<xsl:with-param name="IN_PREC" select="$FUNCTION_PREC"/>
</xsl:apply-templates>