]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/style/contentlib.xsl
- the mathql interpreter is not helm-dependent any more
[helm.git] / helm / style / contentlib.xsl
index 65e08c683f7976c04edfd6f34490596e3a87ff41..00671bd5e44800faf22a29b28a0f5e787c2317f8 100644 (file)
                               xmlns:m="http://www.w3.org/1998/Math/MathML"
                               xmlns:helm="http://www.cs.unibo.it/helm">
 
-<xsl:template name="out-mml-op"> <!-- outputs MML nodes for operators -->
-   <xsl:param name="arity"/>     <!-- operator arity                  -->
-   <xsl:param name="c-tag"/>     <!-- CIC    tag                      -->
-   <xsl:param name="m-tag"/>     <!-- MathML tag                      -->
-   <xsl:param name="mbody"/>     <!-- other sons of m:apply           -->
+<xsl:template name="out-mml-op">       <!-- outputs MML nodes for operators -->
+   <xsl:param name="hide" select="0"/> <!-- number of hidden parameters     -->
+   <xsl:param name="arity"/>           <!-- operator arity                  -->
+   <xsl:param name="c-tag"/>           <!-- CIC    tag                      -->
+   <xsl:param name="m-tag"/>           <!-- MathML tag                      -->
+   <xsl:param name="mbody"/>           <!-- other sons of m:apply           -->
    <xsl:choose>
-      <xsl:when test="count(child::*) = $arity + 1">
+      <xsl:when test="count(child::*) = $arity + $hide + 1">
          <m:apply helm:xref="{@id}">
             <xsl:element name="{concat('m:',$m-tag)}">
                <xsl:attribute name="definitionURL">
 <!-- noannot -->
 
 <xsl:template name="mk-mml-op-noannot">    <!-- makes MML nodes 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:param name="hide" 
+              select="0"/>                          <!-- hidden params      -->
+   <xsl:param name="arity"
+              select="2"/>                          <!-- operator arity      -->
+   <xsl:param name="c-tag"/>                        <!-- CIC    tag          -->
+   <xsl:param name="m-tag"/>                        <!-- MathML tag          -->
    <xsl:param name="rnset" 
-              select="*[position() > 1]"/> <!-- nodes for recursion   -->
+              select="*[position() > 1 + $hide]"/>  <!-- nodes for recursion -->
    <xsl:variable name="mbody">
       <xsl:apply-templates select="$rnset" mode="noannot"/>
    </xsl:variable>
    <xsl:call-template name="out-mml-op">
+      <xsl:with-param name="hide"  select="$hide"/>
       <xsl:with-param name="arity" select="$arity"/>
       <xsl:with-param name="c-tag" select="$c-tag"/>
       <xsl:with-param name="m-tag" select="$m-tag"/>