]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/style/content.xsl
- the mathql interpreter is not helm-dependent any more
[helm.git] / helm / style / content.xsl
index ef9c297a66366db83f93bb14957f0e266b39bed7..e60a85051453d42bcc491199c66231210ffe0776 100644 (file)
@@ -168,9 +168,27 @@ Amaya o da chi di dovere in /really_very_local/helm/PARSER/example/.../]
 </xsl:template>
 
 <xsl:template match="META" mode="pure">
-    <m:ci helm:xref="{@id}">
-     <xsl:call-template name="insert_subscript"><xsl:with-param name="node_value">?<xsl:value-of select="@no"/></xsl:with-param></xsl:call-template>
+   <m:apply helm:xref="{@id}">
+    <m:csymbol>meta</m:csymbol>
+    <m:ci>
+     <xsl:call-template name="insert_subscript">
+      <xsl:with-param name="node_value">
+       <xsl:text>?</xsl:text>
+       <xsl:value-of select="@no"/>
+      </xsl:with-param>
+     </xsl:call-template>
     </m:ci>
+    <xsl:for-each select="substitution">
+     <xsl:choose>
+      <xsl:when test="*[1]">
+       <xsl:apply-templates select="*[1]" mode="noannot"/>
+      </xsl:when>
+      <xsl:otherwise>
+       <m:ci>_</m:ci>
+      </xsl:otherwise>
+     </xsl:choose>
+    </xsl:for-each>
+   </m:apply>
 </xsl:template>
 
 <xsl:template match="CONST" mode="pure">
@@ -212,32 +230,31 @@ Amaya o da chi di dovere in /really_very_local/helm/PARSER/example/.../]
      <xsl:apply-templates select="patternsType/*[1]" mode="noannot"/>
      <xsl:apply-templates select="inductiveTerm/*[1]" mode="noannot"/>
      <xsl:variable name="nop"><xsl:value-of select="$InductiveTypeDoc/InductiveDefinition/@noParams"/></xsl:variable>
-<piecewise>
-     <xsl:for-each select="pattern">
-      <xsl:variable name="pos" select="position()"/>
-      <xsl:variable name="nopar"><xsl:apply-templates select="$InductiveTypeDoc/InductiveDefinition/InductiveType[position()=number($Tindex)+1]/Constructor[position()=number($pos)]/*[1]" mode="counting"><xsl:with-param name="noparams" select="$nop"/></xsl:apply-templates></xsl:variable>
-<piece>
-      <xsl:apply-templates select="./*[1]" mode="abstparams"><xsl:with-param name="noparams" select="$nopar"/><xsl:with-param name="target" select="1"/><xsl:with-param name="binder">LAMBDA</xsl:with-param></xsl:apply-templates>
-
-      <xsl:choose>
-      <xsl:when test="$nopar = 0">
-       <m:ci>
-        <xsl:call-template name="insert_subscript"><xsl:with-param name="node_value"><xsl:value-of select="$InductiveTypeDoc/InductiveDefinition/InductiveType[position()=number($Tindex)+1]/Constructor[position()=number($pos)]/@name"/></xsl:with-param></xsl:call-template>
-       </m:ci>
-      </xsl:when>
-      <xsl:otherwise>
-       <m:apply>
-        <m:csymbol>app</m:csymbol>
-        <m:ci>
-         <xsl:call-template name="insert_subscript"><xsl:with-param name="node_value"><xsl:value-of select="$InductiveTypeDoc/InductiveDefinition/InductiveType[position()=number($Tindex)+1]/Constructor[position()=number($pos)]/@name"/></xsl:with-param></xsl:call-template>
-        </m:ci>
-        <xsl:apply-templates select="./*[1]" mode="abstparams"><xsl:with-param name="noparams" select="$nopar"/><xsl:with-param name="binder">LAMBDA</xsl:with-param></xsl:apply-templates>
-        </m:apply>
-       </xsl:otherwise>
-       </xsl:choose>
-</piece>
-     </xsl:for-each>
-</piecewise> 
+     <m:piecewise>
+      <xsl:for-each select="pattern">
+       <xsl:variable name="pos" select="position()"/>
+       <xsl:variable name="nopar"><xsl:apply-templates select="$InductiveTypeDoc/InductiveDefinition/InductiveType[position()=number($Tindex)+1]/Constructor[position()=number($pos)]/*[1]" mode="counting"><xsl:with-param name="noparams" select="$nop"/></xsl:apply-templates></xsl:variable>
+       <m:piece>
+        <xsl:apply-templates select="./*[1]" mode="abstparams"><xsl:with-param name="noparams" select="$nopar"/><xsl:with-param name="target" select="1"/><xsl:with-param name="binder">LAMBDA</xsl:with-param></xsl:apply-templates>
+        <xsl:choose>
+        <xsl:when test="$nopar = 0">
+         <m:ci>
+          <xsl:call-template name="insert_subscript"><xsl:with-param name="node_value"><xsl:value-of select="$InductiveTypeDoc/InductiveDefinition/InductiveType[position()=number($Tindex)+1]/Constructor[position()=number($pos)]/@name"/></xsl:with-param></xsl:call-template>
+         </m:ci>
+        </xsl:when>
+        <xsl:otherwise>
+         <m:apply>
+          <m:csymbol>app</m:csymbol>
+          <m:ci>
+           <xsl:call-template name="insert_subscript"><xsl:with-param name="node_value"><xsl:value-of select="$InductiveTypeDoc/InductiveDefinition/InductiveType[position()=number($Tindex)+1]/Constructor[position()=number($pos)]/@name"/></xsl:with-param></xsl:call-template>
+          </m:ci>
+          <xsl:apply-templates select="./*[1]" mode="abstparams"><xsl:with-param name="noparams" select="$nopar"/><xsl:with-param name="binder">LAMBDA</xsl:with-param></xsl:apply-templates>
+          </m:apply>
+         </xsl:otherwise>
+         </xsl:choose>
+        </m:piece>
+      </xsl:for-each>
+     </m:piecewise> 
     </m:apply>
 </xsl:template>