xmlns:helm="http://www.cs.unibo.it/helm"
xmlns:xlink="http://www.w3.org/1999/xlink">
-<xsl:template name="mk-mml-infix"> <!-- make MML node for infix operator -->
- <xsl:param name="c-tag"/> <!-- CIC tag -->
- <xsl:param name="m-tag"/> <!-- MathML tag -->
+<xsl:template name="mkmml-op-noannot"> <!-- make MML node for operators (noannot mode) -->
+ <xsl:param name="arity"/> <!-- operator arity -->
+ <xsl:param name="c-tag"/> <!-- CIC tag -->
+ <xsl:param name="m-tag"/> <!-- MathML tag -->
<xsl:choose>
- <xsl:when test="count(child::*) = 3">
+ <xsl:when test="count(child::*) = $arity + 1">
<m:apply helm:xref="{@id}">
<xsl:element name="{concat('m:',$m-tag)}">
<xsl:attribute name="definitionURL">
<xsl:value-of select="$c-tag/@id"/>
</xsl:attribute>
</xsl:element>
- <xsl:apply-templates select="*[2]" mode="noannot"/>
- <xsl:apply-templates select="*[3]" mode="noannot"/>
+ <xsl:apply-templates select="*[position() > 1]" mode="noannot"/>
+ </m:apply>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:apply-imports/>
+ </xsl:otherwise>
+ </xsl:choose>
+</xsl:template>
+
+<xsl:template name="start-interp"> <!-- interp mode starter -->
+ <xsl:param name="rtree"/>
+ <xsl:param name="atree"/>
+ <m:apply helm:xref="{@id}">
+ <m:csymbol>interp</m:csymbol>
+ <xsl:apply-templates mode="interp" select="$rtree">
+ <xsl:with-param name="atree" select="$atree"/>
+ </xsl:apply-templates>
+ </m:apply>
+</xsl:template>
+
+<xsl:template name="mkmml-op-interp"> <!-- make MML node for operators (interp mode) -->
+ <xsl:param name="arity"/> <!-- operator arity -->
+ <xsl:param name="c-tag"/> <!-- CIC tag -->
+ <xsl:param name="m-tag"/> <!-- MathML tag -->
+ <xsl:param name="atree"/> <!-- abstract tree pointer -->
+ <xsl:choose>
+ <xsl:when test="count(child::*) = $arity + 1">
+ <m:apply helm:xref="{@id}">
+ <xsl:element name="{concat('m:',$m-tag)}">
+ <xsl:attribute name="definitionURL">
+ <xsl:value-of select="$c-tag/@uri"/>
+ </xsl:attribute>
+ <xsl:attribute name="helm:xref">
+ <xsl:value-of select="$c-tag/@id"/>
+ </xsl:attribute>
+ </xsl:element>
+ <xsl:apply-templates select="*[position() > 1]" mode="interp">
+ <xsl:with-param name="atree" select="$atree"/>
+ </xsl:apply-templates>
</m:apply>
</xsl:when>
<xsl:otherwise>