]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/style/basic.xsl
contentlib.xsl improved, now handles eq eqT
[helm.git] / helm / style / basic.xsl
index d2441932f3cff0d79f1c8297b48fb06f95985c90..a6150ff40ede74da2a3a286b87d8cc0b443e12ef 100644 (file)
     </m:apply>
 </xsl:template>
 
-<!-- EQUALITY -->
-
-<xsl:template match="APPLY[MUTIND[attribute::uri='cic:/Coq/Init/Logic/Equality/eq.ind'] and (count(child::*) = 4)]" mode="pure">
-    <m:apply helm:xref="{@id}">
-    <m:eq definitionURL="{MUTIND/@uri}" helm:xref="{MUTIND/@id}"/>
-     <xsl:apply-templates select="*[3]" mode="noannot"/>
-     <xsl:apply-templates select="*[4]" mode="noannot"/>
-    </m:apply>
+<!-- EQUALITY and TYPE EQUALITY -->
+
+<xsl:template match="APPLY[MUTIND/@uri='cic:/Coq/Init/Logic/Equality/eq.ind']" mode="pure">
+   <xsl:call-template name="mk-mml-op-noannot">
+      <xsl:with-param name="arity" select="3"/>
+      <xsl:with-param name="c-tag" select="MUTIND"/>
+      <xsl:with-param name="m-tag" select="'eq'"/>
+      <xsl:with-param name="rnset" select="*[position() > 2]"/>
+   </xsl:call-template>
 </xsl:template>
 
-
-<!-- TYPE EQUALITY -->
-
-<xsl:template match="APPLY[MUTIND[attribute::uri='cic:/Coq/Init/Logic_Type/eqT.ind'] and (count(child::*) = 4)]" mode="pure">
-    <m:apply helm:xref="{@id}">
-    <m:eq definitionURL="{MUTIND/@uri}" helm:xref="{MUTIND/@id}"/>
-     <xsl:apply-templates select="*[3]" mode="noannot"/>
-     <xsl:apply-templates select="*[4]" mode="noannot"/>
-    </m:apply>
+<xsl:template match="APPLY[MUTIND/@uri='cic:/Coq/Init/Logic_Type/eqT.ind']" mode="pure">
+   <xsl:call-template name="mk-mml-op-noannot">
+      <xsl:with-param name="arity" select="3"/>
+      <xsl:with-param name="c-tag" select="MUTIND"/>
+      <xsl:with-param name="m-tag" select="'eq'"/>
+      <xsl:with-param name="rnset" select="*[position() > 2]"/>
+   </xsl:call-template>
 </xsl:template>
 
 <!-- NOT-EQ -->