]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/style/mmlctop.xsl-0.14
Version 1.2.1beta => 1.2.1
[helm.git] / helm / style / mmlctop.xsl-0.14
index aca072bb645556ccdaea01b5fde52bf5196ec2e3..be41c5be300c5eeeb5e5229a65019583bea9e639 100755 (executable)
@@ -20,6 +20,7 @@
 <!--  Added the namespace prefix to all the xref attributes -->
 <!--  Changed the mml prefix into m                         -->
 <!--  Added m:xref to every mo element                      -->
+<!--  Changed mchar into the corresponding entity           -->
 <!--  First draft: April 27 2001, Irene Schena              -->
 <!-- ====================================================== -->
 
 <!-- HELM: we don't have a default namespace.
      Removed xmlns="http://www.w3.org/1998/Math/MathML" -->
 
+<!-- HELM: was
 <xsl:output method="xml" indent="yes"/>
+-->
+<xsl:output method="xml"/>
+<!-- HELM -->
 
 <xsl:strip-space elements="apply semantics annotation-xml
         csymbol fn cn ci interval matrix matrixrow vector
@@ -298,8 +303,10 @@ LINEAR ALGEBRA
   <xsl:param name="PAREN" select="$PAR_NO"/>
   <xsl:param name="PAR_NO_IGNORE" select="$YES"/>
 <!-- HELM: added -->
+<!-- CSC
 <xsl:choose>
   <xsl:when test="child::text()">
+-->
 <!-- HELM -->
   <xsl:choose>
     <xsl:when test=". &lt; 0 and $IN_PREC &gt; $NO_PREC and $PAREN=$PAR_NO
@@ -325,6 +332,7 @@ LINEAR ALGEBRA
     </xsl:otherwise>
   </xsl:choose>
 <!-- HELM: added -->
+<!--CSC
   </xsl:when>
   <xsl:otherwise>
    <m:mrow>
@@ -335,6 +343,7 @@ LINEAR ALGEBRA
    </m:mrow> 
   </xsl:otherwise>
  </xsl:choose>
+-->
 <!-- HELM -->
 </xsl:template>
 
@@ -357,7 +366,7 @@ LINEAR ALGEBRA
           <m:mo>+</m:mo>
           <m:mn> <xsl:value-of select="text()[2]"/> </m:mn>
         </xsl:if>
-        <m:mo> <m:mchar name="InvisibleTimes"/> </m:mo>
+        <m:mo>&#x02062;</m:mo>
         <m:mo>i</m:mo>
       </m:mfenced>
     </xsl:when>
@@ -373,7 +382,7 @@ LINEAR ALGEBRA
             <m:mo>+</m:mo>
             <m:mn> <xsl:apply-templates select="text()[2]"/> </m:mn>
           </xsl:if>
-          <m:mo> <m:mchar name="InvisibleTimes"/> </m:mo>
+          <m:mo>&#x02062;</m:mo>
           <m:mo>i</m:mo>
         </m:mfenced>
         <m:mn> <xsl:value-of select="@base"/> </m:mn>
@@ -399,7 +408,7 @@ LINEAR ALGEBRA
     <xsl:when test="@type='polar' and not(@base) and child::m:sep[1]">
       <m:mrow>
         <m:mo>Polar</m:mo>
-        <m:mo> <m:mchar name="InvisibleTimes"/> </m:mo>
+        <m:mo>&#x02062;</m:mo>
         <m:mfenced separators=",">
           <m:mn> <xsl:apply-templates select="text()[1]"/> </m:mn>
           <m:mn> <xsl:apply-templates select="text()[2]"/> </m:mn>
@@ -410,7 +419,7 @@ LINEAR ALGEBRA
       <m:msub>
         <m:mrow>
           <m:mo>Polar</m:mo>
-          <m:mo> <m:mchar name="InvisibleTimes"/> </m:mo>
+          <m:mo>&#x02062;</m:mo>
           <m:mfenced separators=",">
             <m:mn> <xsl:apply-templates select="text()[1]"/> </m:mn>
             <m:mn> <xsl:apply-templates select="text()[2]"/> </m:mn>
@@ -419,9 +428,29 @@ LINEAR ALGEBRA
         <m:mn> <xsl:value-of select="@base"/> </m:mn>
       </m:msub>
    </xsl:when>
-    <xsl:otherwise>
+   <xsl:otherwise>
+<!--HELM: Was:
+ <m:mn> <xsl:apply-templates mode = "semantics"/> </m:mn>
+HELM: Now is: -->
+    <xsl:choose>
+     <xsl:when test="child::text() and not(*[1])">
       <m:mn> <xsl:apply-templates mode = "semantics"/> </m:mn>
-    </xsl:otherwise>
+     </xsl:when>
+     <xsl:otherwise>
+      <xsl:choose>
+       <xsl:when test="not(*[2])">
+        <xsl:copy-of select="*[1]"/>
+       </xsl:when>
+       <xsl:otherwise>
+        <m:mrow>
+         <xsl:copy-of select="*|text()"/>
+        </m:mrow>
+       </xsl:otherwise>
+      </xsl:choose>
+     </xsl:otherwise>
+    </xsl:choose>
+<!-- HELM -->
+   </xsl:otherwise>
   </xsl:choose>
 </xsl:template>
 
@@ -444,7 +473,7 @@ LINEAR ALGEBRA
           <m:mo>+</m:mo>
           <m:mn> <xsl:value-of select="text()[2]"/> </m:mn>
         </xsl:if>
-        <m:mo> <m:mchar name="InvisibleTimes"/> </m:mo>
+        <m:mo>&#x02062;</m:mo>
         <m:mo>i</m:mo>
       </m:mfenced>
     </xsl:when>
@@ -460,7 +489,7 @@ LINEAR ALGEBRA
             <m:mo>+</m:mo>
             <m:mn> <xsl:apply-templates select="text()[2]"/> </m:mn>
           </xsl:if>
-          <m:mo> <m:mchar name="InvisibleTimes"/> </m:mo>
+          <m:mo>&#x02062;</m:mo>
           <m:mo>i</m:mo>
         </m:mfenced>
         <m:mn> <xsl:value-of select="@base"/> </m:mn>
@@ -486,7 +515,7 @@ LINEAR ALGEBRA
     <xsl:when test="@type='polar' and not(@base) and child::m:sep[1]">
       <m:mrow m:xref="{@id}">
         <m:mo>Polar</m:mo>
-        <m:mo> <m:mchar name="InvisibleTimes"/> </m:mo>
+        <m:mo>&#x02062;</m:mo>
         <m:mfenced separators=",">
           <m:mn> <xsl:apply-templates select="text()[1]"/> </m:mn>
           <m:mn> <xsl:apply-templates select="text()[2]"/> </m:mn>
@@ -497,7 +526,7 @@ LINEAR ALGEBRA
       <m:msub m:xref="{@id}">
         <m:mrow>
           <m:mo>Polar</m:mo>
-          <m:mo> <m:mchar name="InvisibleTimes"/> </m:mo>
+          <m:mo>&#x02062;</m:mo>
           <m:mfenced separators=",">
             <m:mn> <xsl:apply-templates select="text()[1]"/> </m:mn>
             <m:mn> <xsl:apply-templates select="text()[2]"/> </m:mn>
@@ -506,17 +535,38 @@ LINEAR ALGEBRA
         <m:mn> <xsl:value-of select="@base"/> </m:mn>
       </m:msub>
    </xsl:when>
-    <xsl:otherwise>
+   <xsl:otherwise>
+    <xsl:choose>
+     <xsl:when test="child::text() and not(*[1])">
       <m:mn m:xref="{@id}"> <xsl:apply-templates mode = "semantics"/> </m:mn>
-    </xsl:otherwise>
+     </xsl:when>
+     <xsl:otherwise>
+      <xsl:variable name="id" select="@id"/>
+      <xsl:choose>
+       <xsl:when test="not(*[2])">
+        <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>
+       </xsl:when>
+       <xsl:otherwise>
+        <m:mrow m:xref="{$id}">
+         <xsl:copy-of select="*|text()"/>
+        </m:mrow>
+       </xsl:otherwise>
+      </xsl:choose>
+     </xsl:otherwise>
+    </xsl:choose>
+   </xsl:otherwise>
   </xsl:choose>
 </xsl:template>
 
 <!-- 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">
@@ -563,21 +613,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>
 
@@ -649,8 +700,7 @@ an mo. Mixed content: mrow which contains mo + presentation elements -->
           <xsl:attribute name="m:xref">
             <xsl:value-of select="m:fn/@id"/>
           </xsl:attribute>
-        </xsl:if>
-    <m:mchar name='ApplyFunction'/> </m:mo>
+        </xsl:if>&#x02061;</m:mo>
     <m:mfenced separators=",">
       <xsl:apply-templates select = "*[position()>1]" mode = "semantics"/>
     </m:mfenced>
@@ -688,7 +738,7 @@ an mo. Mixed content: mrow which contains mo + presentation elements -->
       </xsl:attribute>
     </xsl:if>
     <xsl:apply-templates select = "*[1]" mode = "semantics"/>
-    <m:mo> <m:mchar name='ApplyFunction'/> </m:mo>
+    <m:mo>&#x02061;</m:mo>
     <m:mfenced separators=",">
       <xsl:apply-templates select = "*[position()>1]" mode = "semantics"/>
     </m:mfenced>
@@ -819,8 +869,8 @@ an mo. Mixed content: mrow which contains mo + presentation elements -->
         <xsl:value-of select="@id"/>
       </xsl:attribute>
     </xsl:if>
-    <m:mo> <m:mchar name='Lambda'/> </m:mo>
-    <m:mo> <m:mchar name='ApplyFunction'/> </m:mo>
+    <m:mo>&#x0039B;</m:mo>
+    <m:mo>&#x02061;</m:mo>
     <m:mfenced separators=",">
       <xsl:for-each select = "*">
         <xsl:choose>
@@ -846,7 +896,7 @@ an mo. Mixed content: mrow which contains mo + presentation elements -->
       </xsl:attribute>
     </xsl:if>
     <xsl:apply-templates select = "*[1]" mode = "semantics"/>
-    <m:mo> <m:mchar name='ApplyFunction'/> </m:mo>
+    <m:mo>&#x02061;</m:mo>
     <m:mfenced separators=",">
       <xsl:apply-templates select = "*[position()>1]" mode = "semantics"/>
     </m:mfenced>
@@ -870,8 +920,7 @@ an mo. Mixed content: mrow which contains mo + presentation elements -->
           <xsl:attribute name="m:xref">
             <xsl:value-of select="../m:compose/@id"/>
           </xsl:attribute>
-        </xsl:if>
-      <m:mchar name="SmallCircle"/> </m:mo>
+        </xsl:if>&#x02218;</m:mo>
       <xsl:apply-templates select = "." mode="semantics"/>
     </xsl:for-each>
   </m:mfenced>
@@ -898,9 +947,7 @@ an mo. Mixed content: mrow which contains mo + presentation elements -->
         <xsl:value-of select="@id"/>
       </xsl:attribute>
     </xsl:if>
-    <m:mo form="prefix" fence="true" stretchy="true" lspace="0em" rspace="0em">
-      <m:mchar name="LeftFloor"/>
-    </m:mo>
+    <m:mo form="prefix" fence="true" stretchy="true" lspace="0em" rspace="0em">&#x0230A;</m:mo>
     <m:mfrac>
 <!-- HELM: added -->        
         <xsl:if test="($SEM_SW=$SEM_XREF or $SEM_SW=$SEM_XREF_EXT) and @id">
@@ -920,9 +967,7 @@ an mo. Mixed content: mrow which contains mo + presentation elements -->
         </xsl:apply-templates>
       </m:mrow>
     </m:mfrac>
-    <m:mo form="postfix" fence="true" stretchy="true" lspace="0em" rspace="0em">
-      <m:mchar name="LeftFloor"/>
-    </m:mo>
+    <m:mo form="postfix" fence="true" stretchy="true" lspace="0em" rspace="0em">&#x0230A;</m:mo>
   </m:mrow>
 </xsl:template>
 
@@ -1398,7 +1443,7 @@ an mo. Mixed content: mrow which contains mo + presentation elements -->
   <xsl:if test="*[3]">
     <xsl:for-each select = "*[position()>2]">
 <!-- HELM: to distinguish between * and the application -->
-<!--      <m:mo> <mchar name="InvisibleTimes"/> </m:mo> -->
+<!--      <m:mo>&#x02062;</m:mo> -->
       <m:mo>
 <!-- HELM: added -->        
         <xsl:if test="($SEM_SW=$SEM_XREF or $SEM_SW=$SEM_XREF_EXT) and @id">
@@ -1536,8 +1581,7 @@ an mo. Mixed content: mrow which contains mo + presentation elements -->
           <xsl:attribute name="m:xref">
             <xsl:value-of select="../m:and/@id"/>
           </xsl:attribute>
-        </xsl:if>
- <m:mchar name="wedge"/></m:mo>
+        </xsl:if>&#x02227;</m:mo>
     <xsl:apply-templates select="." mode = "semantics">
       <xsl:with-param name="IN_PREC" select="$AND_PREC"/>
       <xsl:with-param name="PAREN" select="$PAREN"/>
@@ -1607,8 +1651,7 @@ an mo. Mixed content: mrow which contains mo + presentation elements -->
           <xsl:attribute name="m:xref">
             <xsl:value-of select="../m:or/@id"/>
           </xsl:attribute>
-        </xsl:if>
-    <m:mchar name="vee"/> </m:mo>
+        </xsl:if>&#x02228;</m:mo>
     <xsl:apply-templates select="." mode = "semantics">
       <xsl:with-param name="IN_PREC" select="$OR_PREC"/>
       <xsl:with-param name="PAREN" select="$PAREN"/>
@@ -1677,8 +1720,7 @@ an mo. Mixed content: mrow which contains mo + presentation elements -->
           <xsl:attribute name="m:xref">
             <xsl:value-of select="../m:xor/@id"/>
           </xsl:attribute>
-        </xsl:if>
-    <m:mchar name="xor"/> </m:mo>
+        </xsl:if>&#x022BB;</m:mo>
     <xsl:apply-templates select="." mode = "semantics">
       <xsl:with-param name="IN_PREC" select="$XOR_PREC"/>
       <xsl:with-param name="PAREN" select="$PAREN"/>
@@ -1701,7 +1743,7 @@ an mo. Mixed content: mrow which contains mo + presentation elements -->
           <xsl:attribute name="m:xref">
             <xsl:value-of select="m:not/@id"/>
           </xsl:attribute>
-        </xsl:if><m:mchar name="not"/></m:mo>
+        </xsl:if>&#x000AC;</m:mo>
     <xsl:apply-templates select = "*[2]" mode = "semantics">
       <xsl:with-param name="IN_PREC" select="$FUNCTION_PREC"/>
     </xsl:apply-templates>
@@ -1755,8 +1797,7 @@ an mo. Mixed content: mrow which contains mo + presentation elements -->
           <xsl:attribute name="m:xref">
             <xsl:value-of select="m:exists/@id"/>
           </xsl:attribute>
-        </xsl:if>
-    <m:mchar name="Exists"/> </m:mo>
+        </xsl:if>&#x02203;</m:mo>
     <xsl:if test="count(m:bvar) &gt; 1">
       <m:mfenced separators=",">
         <xsl:for-each select = "m:bvar">
@@ -1821,8 +1862,7 @@ an mo. Mixed content: mrow which contains mo + presentation elements -->
           <xsl:attribute name="m:xref">
             <xsl:value-of select="m:conjugate/@id"/>
           </xsl:attribute>
-        </xsl:if>
-    <m:mchar name="UnderBar"/> </m:mo>
+        </xsl:if>&#x00332;</m:mo>
   </m:mover>
 </xsl:template>
 
@@ -1893,7 +1933,7 @@ an mo. Mixed content: mrow which contains mo + presentation elements -->
             <xsl:value-of select="m:neq/@id"/>
           </xsl:attribute>
         </xsl:if>
-          <m:mchar name="NotEqual"/>
+        &#x02260;
         </xsl:if>
         <xsl:if test="*[1]=m:approx">
 <!-- HELM: added -->        
@@ -1902,7 +1942,7 @@ an mo. Mixed content: mrow which contains mo + presentation elements -->
             <xsl:value-of select="m:approx/@id"/>
           </xsl:attribute>
         </xsl:if>
-          <m:mchar name="approxeq"/>
+        &#x0224A;
         </xsl:if>
         <xsl:if test="*[1]=m:tendsto">
 <!-- HELM: added -->        
@@ -1911,7 +1951,7 @@ an mo. Mixed content: mrow which contains mo + presentation elements -->
             <xsl:value-of select="m:tendsto/@id"/>
           </xsl:attribute>
         </xsl:if>
-          <m:mchar name="RightArrow"/>
+        &#x02192;
         </xsl:if>
         <xsl:if test="*[1]=m:implies">
 <!-- HELM: added -->        
@@ -1920,7 +1960,7 @@ an mo. Mixed content: mrow which contains mo + presentation elements -->
             <xsl:value-of select="m:implies/@id"/>
           </xsl:attribute>
         </xsl:if>
-          <m:mchar name="DoubleRightArrow"/>
+        &#x021D2;
         </xsl:if>
         <xsl:if test="*[1]=m:in">
 <!-- HELM: added -->        
@@ -1929,7 +1969,7 @@ an mo. Mixed content: mrow which contains mo + presentation elements -->
             <xsl:value-of select="m:in/@id"/>
           </xsl:attribute>
         </xsl:if>
-          <m:mchar name="Element"/>
+        &#x02208;
         </xsl:if>
         <xsl:if test="*[1]=m:notin">
 <!-- HELM: added -->        
@@ -1938,7 +1978,7 @@ an mo. Mixed content: mrow which contains mo + presentation elements -->
             <xsl:value-of select="m:notin/@id"/>
           </xsl:attribute>
         </xsl:if>
-          <m:mchar name="NotElement"/>
+        &#x02209;
         </xsl:if>
         <xsl:if test="*[1]=m:notsubset">
 <!-- HELM: added -->        
@@ -1947,7 +1987,7 @@ an mo. Mixed content: mrow which contains mo + presentation elements -->
             <xsl:value-of select="m:notsubset/@id"/>
           </xsl:attribute>
         </xsl:if>
-          <m:mchar name="NotSubset"/>
+        &#x02284;
         </xsl:if>
         <xsl:if test="*[1]=m:notprsubset">
 <!-- HELM: added -->        
@@ -1956,7 +1996,7 @@ an mo. Mixed content: mrow which contains mo + presentation elements -->
             <xsl:value-of select="m:notprsubset/@id"/>
           </xsl:attribute>
         </xsl:if>
-          <m:mchar name="NotSubsetEqual"/>
+        &#x02288;
         </xsl:if>
       </m:mo>
       <xsl:apply-templates select = "*[3]" mode = "semantics"/>
@@ -1991,7 +2031,7 @@ an mo. Mixed content: mrow which contains mo + presentation elements -->
             <xsl:value-of select="../m:subset/@id"/>
           </xsl:attribute>
         </xsl:if>
-            <m:mchar name="SubsetEqual"/>
+        &#x02286;
           </xsl:if>
           <xsl:if test="../*[self::m:prsubset][1]">
 <!-- HELM: added -->        
@@ -2000,7 +2040,7 @@ an mo. Mixed content: mrow which contains mo + presentation elements -->
             <xsl:value-of select="../m:prsubset/@id"/>
           </xsl:attribute>
         </xsl:if>
-            <m:mchar name="subset"/>
+        &#x02282;
           </xsl:if>
           <xsl:if test="../*[self::m:eq][1]">
 <!-- HELM: added -->        
@@ -2036,7 +2076,7 @@ an mo. Mixed content: mrow which contains mo + presentation elements -->
             <xsl:value-of select="../m:geq/@id"/>
           </xsl:attribute>
         </xsl:if>
-            <m:mchar name="geq"/>
+        &#x02265;
           </xsl:if>
           <xsl:if test="../*[self::m:leq][1]">
 <!-- HELM: added -->        
@@ -2045,7 +2085,7 @@ an mo. Mixed content: mrow which contains mo + presentation elements -->
             <xsl:value-of select="../m:leq/@id"/>
           </xsl:attribute>
         </xsl:if>
-            <m:mchar name="leq"/>
+        &#x02264;
           </xsl:if>
           <xsl:if test="../*[self::m:equivalent][1]">
 <!-- HELM: added -->        
@@ -2054,7 +2094,7 @@ an mo. Mixed content: mrow which contains mo + presentation elements -->
             <xsl:value-of select="../m:equivalent/@id"/>
           </xsl:attribute>
         </xsl:if>
-            <m:mchar name="Congruent"/>
+        &#x02261;
           </xsl:if>
         </m:mo>
         <xsl:apply-templates select = "." mode="semantics"/>
@@ -2096,7 +2136,7 @@ an mo. Mixed content: mrow which contains mo + presentation elements -->
         </xsl:if>ln</m:mo>
       </xsl:otherwise>
     </xsl:choose>
-    <m:mo> <m:mchar name='ApplyFunction'/> </m:mo>
+    <m:mo>&#x02061;</m:mo>
     <xsl:apply-templates select = "*[2]" mode = "semantics">
       <xsl:with-param name="IN_PREC" select="$FUNCTION_PREC"/>
     </xsl:apply-templates>
@@ -2156,7 +2196,7 @@ an mo. Mixed content: mrow which contains mo + presentation elements -->
         </xsl:if>
       </xsl:otherwise>
     </xsl:choose>
-    <m:mo> <m:mchar name='ApplyFunction'/> </m:mo>
+    <m:mo>&#x02061;</m:mo>
     <xsl:if test="*[2]=m:logbase">
       <xsl:apply-templates select = "*[3]" mode = "semantics">
         <xsl:with-param name="IN_PREC" select="$FUNCTION_PREC"/>
@@ -2334,7 +2374,7 @@ an mo. Mixed content: mrow which contains mo + presentation elements -->
             <xsl:value-of select="m:laplacian/@id"/>
           </xsl:attribute>
         </xsl:if>
-      <m:mo> <m:mchar name="Delta"/> </m:mo>
+      <m:mo>&#x00394;</m:mo>
       <m:mn>2</m:mn>
     </m:msup>
     <xsl:apply-templates select = "*[2]" mode = "semantics"/>
@@ -2439,8 +2479,7 @@ an mo. Mixed content: mrow which contains mo + presentation elements -->
           <xsl:attribute name="m:xref">
             <xsl:value-of select="../m:union/@id"/>
           </xsl:attribute>
-        </xsl:if>
-    <m:mchar name="Union"/> </m:mo>
+        </xsl:if>&#x022C3;</m:mo>
     <xsl:apply-templates select = "." mode="semantics">
       <xsl:with-param name="IN_PREC" select="$UNION_PREC"/>
       <xsl:with-param name="PAREN" select="$PAREN"/>
@@ -2512,8 +2551,7 @@ an mo. Mixed content: mrow which contains mo + presentation elements -->
           <xsl:attribute name="m:xref">
             <xsl:value-of select="../m:intersect/@id"/>
           </xsl:attribute>
-        </xsl:if>
-    <m:mchar name="Intersection"/> </m:mo>
+        </xsl:if>&#x022C2;</m:mo>
     <xsl:apply-templates select = "." mode="semantics">
       <xsl:with-param name="IN_PREC" select="$INTERSECT_PREC"/>
       <xsl:with-param name="PAREN" select="$PAREN"/>
@@ -2628,7 +2666,7 @@ an mo. Mixed content: mrow which contains mo + presentation elements -->
             <xsl:value-of select="m:sum/@id"/>
           </xsl:attribute>
         </xsl:if>
-              <m:mchar name="Sum"/>
+        &#x02211;
             </xsl:if>
             <xsl:if test="*[1]=m:product">
 <!-- HELM: added -->        
@@ -2637,7 +2675,7 @@ an mo. Mixed content: mrow which contains mo + presentation elements -->
             <xsl:value-of select="m:product/@id"/>
           </xsl:attribute>
         </xsl:if>
-              <m:mchar name="Product"/>
+        &#x0220F;
             </xsl:if>
           </m:mo>
           <m:mrow>
@@ -2659,7 +2697,7 @@ an mo. Mixed content: mrow which contains mo + presentation elements -->
             <xsl:value-of select="m:sum/@id"/>
           </xsl:attribute>
         </xsl:if>
-              <m:mchar name="Sum"/>
+        &#x02211;
             </xsl:if>
             <xsl:if test="*[1]=m:product">
 <!-- HELM: added -->        
@@ -2668,7 +2706,7 @@ an mo. Mixed content: mrow which contains mo + presentation elements -->
             <xsl:value-of select="m:product/@id"/>
           </xsl:attribute>
         </xsl:if>
-              <m:mchar name="Product"/>
+        &#x0220F;
             </xsl:if>
           </m:mo>
           <xsl:apply-templates select = "*[3]" mode = "semantics"/>
@@ -2697,7 +2735,7 @@ an mo. Mixed content: mrow which contains mo + presentation elements -->
       <m:mrow>
         <xsl:if test="*[2]=m:bvar and *[3]=m:lowlimit">
             <xsl:apply-templates select = "*[2]" mode = "semantics"/>
-            <m:mo> <m:mchar name="RightArrow"/> </m:mo>
+            <m:mo>&#x02192;</m:mo>
             <xsl:apply-templates select = "*[3]" mode = "semantics"/>
         </xsl:if>
         <xsl:if test="*[2]=m:bvar and *[3]=m:condition">
@@ -2733,7 +2771,7 @@ an mo. Mixed content: mrow which contains mo + presentation elements -->
         <xsl:apply-templates select = "../*[3]" mode = "semantics"/>
       </m:msup>
     </xsl:if>
-    <m:mo> <m:mchar name='ApplyFunction'/> </m:mo>
+    <m:mo>&#x02061;</m:mo>
     <xsl:apply-templates select = "*[2]" mode = "semantics">
       <xsl:with-param name="IN_PREC" select="$FUNCTION_PREC"/>
       <xsl:with-param name="PAR_NO_IGNORE" select="$NO"/>
@@ -2827,8 +2865,7 @@ an mo. Mixed content: mrow which contains mo + presentation elements -->
           <xsl:attribute name="m:xref">
             <xsl:value-of select="m:sdev/@id"/>
           </xsl:attribute>
-        </xsl:if>
-    <m:mchar name="sigma"/> </m:mo>
+        </xsl:if>&#x003C3;</m:mo>
     <m:mfenced separators=",">
       <xsl:for-each select = "*[position()>1]">
         <xsl:apply-templates select = "." mode="semantics"/>
@@ -2850,8 +2887,7 @@ an mo. Mixed content: mrow which contains mo + presentation elements -->
           <xsl:attribute name="m:xref">
             <xsl:value-of select="m:variance/@id"/>
           </xsl:attribute>
-        </xsl:if>
-    <m:mchar name="sigma"/> </m:mo>
+        </xsl:if>&#x003C3;</m:mo>
     <m:msup>
       <m:mfenced separators=",">
         <xsl:for-each select = "*[position()>1]">
@@ -3048,7 +3084,7 @@ an mo. Mixed content: mrow which contains mo + presentation elements -->
             <xsl:value-of select="m:vectorproduct/@id"/>
           </xsl:attribute>
         </xsl:if>
-        <m:mchar name="Cross"/>
+        &#x02A2F;
       </xsl:if>
       <xsl:if test="m:scalarproduct[1] | m:outerproduct[1]">
 <!-- HELM: added -->