]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/style/mmlctop.xsl-0.14
The patch of Irene to allow MathML presentation inside <m:ci>
[helm.git] / helm / style / mmlctop.xsl-0.14
index 4ab889155b1293fd5cfab544a816643e7889c290..ade27944aa038424e6755b845ff74dd010aa0bfb 100755 (executable)
@@ -515,9 +515,6 @@ LINEAR ALGEBRA
 
 <!-- HELM: ci could not contain MAthML presentation -->
 <xsl:template match = "m:ci">
-<!-- HELM: added -->
-<xsl:choose>
-  <xsl:when test="child::text()">
 <!-- HELM -->
   <xsl:choose>
     <xsl:when test="@type='vector' or @type=matrix or @type=set">
@@ -564,21 +561,22 @@ LINEAR ALGEBRA
         </m:mrow>
       </xsl:if>
       <xsl:if test="not(*[2])">
+<!--HELM: Was:
         <xsl:apply-templates select="*[1]"/>
+HELM: Now is: -->
+        <xsl:variable name="id" select="@id"/>
+        <xsl:for-each select="*[1]">
+         <xsl:copy>
+          <xsl:attribute name="m:xref">
+           <xsl:value-of select="$id"/>
+          </xsl:attribute>
+         <xsl:copy-of select="@*|*"/>
+         </xsl:copy>
+        </xsl:for-each>
+<!-- HELM -->
       </xsl:if>
     </xsl:otherwise>
   </xsl:choose>
-<!-- HELM: added -->
-</xsl:when>
-  <xsl:otherwise>
-   <m:mrow>
-    <xsl:copy-of select="*"/>
-    <xsl:attribute name="m:xref">
-     <xsl:value-of select="@id"/>
-    </xsl:attribute>
-   </m:mrow> 
-  </xsl:otherwise>
- </xsl:choose>
 <!-- HELM -->
 </xsl:template>