]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/style/mmlctop.xsl-0.14
- the mathql interpreter is not helm-dependent any more
[helm.git] / helm / style / mmlctop.xsl-0.14
index aca072bb645556ccdaea01b5fde52bf5196ec2e3..1568e1da2deefc9818f6aab66c4adbf80a2c176d 100755 (executable)
@@ -19,7 +19,8 @@
 <!--  Added the namespace prefix to all the output elements -->
 <!--  Added the namespace prefix to all the xref attributes -->
 <!--  Changed the mml prefix into m                         -->
-<!--  Added m:xref to every mo element                      -->
+<!--  Added 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
@@ -250,7 +255,7 @@ LINEAR ALGEBRA
         <xsl:when test="self::m:semantics">
           <xsl:copy>
             <xsl:copy-of select="@*"/>
-            <xsl:attribute name="m:xref">
+            <xsl:attribute name="xref">
               <xsl:value-of select="@id"/>
             </xsl:attribute>
             <xsl:copy-of select="*[1]"/>
@@ -298,15 +303,17 @@ 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
                                                    and $PAR_NO_IGNORE=$NO">
       <m:mfenced separators="">
         <xsl:if test="($SEM_SW=$SEM_XREF or $SEM_SW=$SEM_XREF_EXT) and @id">
-          <xsl:attribute name="m:xref">
+          <xsl:attribute name="xref">
             <xsl:value-of select="@id"/>
           </xsl:attribute>
         </xsl:if>
@@ -325,16 +332,18 @@ LINEAR ALGEBRA
     </xsl:otherwise>
   </xsl:choose>
 <!-- HELM: added -->
+<!--CSC
   </xsl:when>
   <xsl:otherwise>
    <m:mrow>
-    <xsl:attribute name="m:xref">
+    <xsl:attribute name="xref">
      <xsl:value-of select="@id"/>
     </xsl:attribute>
     <xsl:copy-of select="*"/>
    </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,22 +428,42 @@ 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>
 
 <xsl:template match = "m:cn" mode="cnid">
   <xsl:choose>
     <xsl:when test="@base and (not(@type) or @type='integer' or @type='real')">
-      <m:msub m:xref="{@id}">
+      <m:msub xref="{@id}">
         <m:mn> <xsl:apply-templates mode = "semantics"/> </m:mn>
         <m:mn> <xsl:value-of select="@base"/> </m:mn>
       </m:msub>
     </xsl:when>
     <xsl:when test="@type='complex' and not(@base) and child::m:sep[1]">
-      <m:mfenced separators="" m:xref="{@id}">
+      <m:mfenced separators="" xref="{@id}">
         <m:mn> <xsl:apply-templates select="text()[1]" mode = "semantics"/> </m:mn>
         <xsl:if test="text()[2] &lt; 0">
           <m:mo>-</m:mo>
@@ -444,12 +473,12 @@ 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>
     <xsl:when test="@type='complex' and @base and child::m:sep[1]">
-      <m:msub m:xref="{@id}">
+      <m:msub xref="{@id}">
         <m:mfenced separators="">
           <m:mn> <xsl:apply-templates select="text()[1]"/> </m:mn>
           <xsl:if test="text()[2] &lt; 0">
@@ -460,20 +489,20 @@ 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>
       </m:msub>
     </xsl:when>
     <xsl:when test="@type='rational' and not(@base) and child::m:sep[1]">
-      <m:mfrac m:xref="{@id}">
+      <m:mfrac xref="{@id}">
         <m:mn> <xsl:apply-templates select="text()[1]"/> </m:mn>
         <m:mn> <xsl:apply-templates select="text()[2]"/> </m:mn>
       </m:mfrac>
     </xsl:when>
     <xsl:when test="@type='rational' and @base and child::m:sep[1]">
-      <m:msub m:xref="{@id}">
+      <m:msub xref="{@id}">
         <m:mfenced>
           <m:mfrac>
             <m:mn> <xsl:apply-templates select="text()[1]"/> </m:mn>
@@ -484,9 +513,9 @@ LINEAR ALGEBRA
       </m:msub>
     </xsl:when>
     <xsl:when test="@type='polar' and not(@base) and child::m:sep[1]">
-      <m:mrow m:xref="{@id}">
+      <m:mrow 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>
@@ -494,10 +523,10 @@ LINEAR ALGEBRA
       </m:mrow>
     </xsl:when>
     <xsl:when test="@type='polar' and @base and child::m:sep[1]">
-      <m:msub m:xref="{@id}">
+      <m:msub 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,23 +535,44 @@ LINEAR ALGEBRA
         <m:mn> <xsl:value-of select="@base"/> </m:mn>
       </m:msub>
    </xsl:when>
-    <xsl:otherwise>
-      <m:mn m:xref="{@id}"> <xsl:apply-templates mode = "semantics"/> </m:mn>
-    </xsl:otherwise>
+   <xsl:otherwise>
+    <xsl:choose>
+     <xsl:when test="child::text() and not(*[1])">
+      <m:mn xref="{@id}"> <xsl:apply-templates mode = "semantics"/> </m:mn>
+     </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="xref">
+           <xsl:value-of select="$id"/>
+          </xsl:attribute>
+          <xsl:copy-of select="@*|*"/>
+         </xsl:copy>
+        </xsl:for-each>
+       </xsl:when>
+       <xsl:otherwise>
+        <m:mrow 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">
       <m:mi fontweight="bold">
         <xsl:if test="($SEM_SW=$SEM_XREF or $SEM_SW=$SEM_XREF_EXT) and @id">
-          <xsl:attribute name="m:xref">
+          <xsl:attribute name="xref">
             <xsl:value-of select="@id"/>
           </xsl:attribute>
         </xsl:if>
@@ -532,7 +582,7 @@ LINEAR ALGEBRA
     <xsl:when test="child::text() and not(child::*[1])">
       <m:mi>
         <xsl:if test="($SEM_SW=$SEM_XREF or $SEM_SW=$SEM_XREF_EXT) and @id">
-          <xsl:attribute name="m:xref">
+          <xsl:attribute name="xref">
             <xsl:value-of select="@id"/>
           </xsl:attribute>
         </xsl:if>
@@ -543,7 +593,7 @@ LINEAR ALGEBRA
     <xsl:when test="child::text() and *[1] and not(*[1]=m:sep)">
       <m:mrow>
         <xsl:if test="($SEM_SW=$SEM_XREF or $SEM_SW=$SEM_XREF_EXT) and @id">
-          <xsl:attribute name="m:xref">
+          <xsl:attribute name="xref">
             <xsl:value-of select="@id"/>
           </xsl:attribute>
         </xsl:if>
@@ -555,7 +605,7 @@ LINEAR ALGEBRA
       <xsl:if test="*[2]">
         <m:mrow>
           <xsl:if test="($SEM_SW=$SEM_XREF or $SEM_SW=$SEM_XREF_EXT) and @id">
-            <xsl:attribute name="m:xref">
+            <xsl:attribute name="xref">
               <xsl:value-of select="@id"/>
             </xsl:attribute>
           </xsl:if>
@@ -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="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>
 
@@ -589,7 +640,7 @@ LINEAR ALGEBRA
 <xsl:template match = "m:csymbol">
 <!-- HELM: added -->
    <m:mrow>
-    <xsl:attribute name="m:xref">
+    <xsl:attribute name="xref">
      <xsl:value-of select="@id"/>
     </xsl:attribute>
 <!-- HELM -->
@@ -638,7 +689,7 @@ an mo. Mixed content: mrow which contains mo + presentation elements -->
 <xsl:template match = "m:apply[m:*[1][self::m:fn]]">
   <m:mrow>
     <xsl:if test="($SEM_SW=$SEM_XREF or $SEM_SW=$SEM_XREF_EXT) and @id">
-      <xsl:attribute name="m:xref">
+      <xsl:attribute name="xref">
         <xsl:value-of select="@id"/>
       </xsl:attribute>
     </xsl:if>
@@ -646,11 +697,10 @@ an mo. Mixed content: mrow which contains mo + presentation elements -->
     <m:mo> 
 <!-- HELM: added -->        
         <xsl:if test="($SEM_SW=$SEM_XREF or $SEM_SW=$SEM_XREF_EXT) and @id">
-          <xsl:attribute name="m:xref">
+          <xsl:attribute name="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>
@@ -666,7 +716,7 @@ an mo. Mixed content: mrow which contains mo + presentation elements -->
 <xsl:template match = "m:interval">
   <m:mfenced separators=",">
     <xsl:if test="($SEM_SW=$SEM_XREF or $SEM_SW=$SEM_XREF_EXT) and @id">
-      <xsl:attribute name="m:xref">
+      <xsl:attribute name="xref">
         <xsl:value-of select="@id"/>
       </xsl:attribute>
     </xsl:if>
@@ -683,12 +733,12 @@ an mo. Mixed content: mrow which contains mo + presentation elements -->
 <xsl:template match = "m:apply[m:*[1][self::m:apply[m:inverse[1]]]]">
   <m:mrow>
     <xsl:if test="($SEM_SW=$SEM_XREF or $SEM_SW=$SEM_XREF_EXT) and @id">
-      <xsl:attribute name="m:xref">
+      <xsl:attribute name="xref">
         <xsl:value-of select="@id"/>
       </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>
@@ -704,7 +754,7 @@ an mo. Mixed content: mrow which contains mo + presentation elements -->
                     *[2]=m:arccos or *[2]=m:arctan">
       <m:mo>
         <xsl:if test="($SEM_SW=$SEM_XREF or $SEM_SW=$SEM_XREF_EXT) and @id">
-          <xsl:attribute name="m:xref">
+          <xsl:attribute name="xref">
             <xsl:value-of select="@id"/>
           </xsl:attribute>
         </xsl:if>
@@ -714,7 +764,7 @@ an mo. Mixed content: mrow which contains mo + presentation elements -->
     <xsl:otherwise>
       <m:msup>
         <xsl:if test="($SEM_SW=$SEM_XREF or $SEM_SW=$SEM_XREF_EXT) and @id">
-          <xsl:attribute name="m:xref">
+          <xsl:attribute name="xref">
             <xsl:value-of select="@id"/>
           </xsl:attribute>
         </xsl:if>
@@ -791,7 +841,7 @@ an mo. Mixed content: mrow which contains mo + presentation elements -->
     <xsl:otherwise>
       <xsl:choose>
         <xsl:when test="($SEM_SW=$SEM_XREF or $SEM_SW=$SEM_XREF_EXT) and @id">
-          <m:mrow m:xref="{@id}">
+          <m:mrow xref="{@id}">
             <xsl:apply-templates select="*" mode = "semantics"/>
           </m:mrow>
         </xsl:when>
@@ -815,12 +865,12 @@ an mo. Mixed content: mrow which contains mo + presentation elements -->
 <xsl:template match = "m:lambda">
   <m:mrow>
     <xsl:if test="($SEM_SW=$SEM_XREF or $SEM_SW=$SEM_XREF_EXT) and @id">
-      <xsl:attribute name="m:xref">
+      <xsl:attribute name="xref">
         <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>
@@ -841,12 +891,12 @@ an mo. Mixed content: mrow which contains mo + presentation elements -->
 <xsl:template match = "m:apply[*[1][self::m:apply[m:compose[1]]]]">
   <m:mrow>
     <xsl:if test="($SEM_SW=$SEM_XREF or $SEM_SW=$SEM_XREF_EXT) and @id">
-      <xsl:attribute name="m:xref">
+      <xsl:attribute name="xref">
         <xsl:value-of select="@id"/>
       </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>
@@ -856,7 +906,7 @@ an mo. Mixed content: mrow which contains mo + presentation elements -->
 <xsl:template match = "m:apply[*[1][self::m:compose]]">
   <m:mfenced separators="">
     <xsl:if test="($SEM_SW=$SEM_XREF or $SEM_SW=$SEM_XREF_EXT) and @id">
-      <xsl:attribute name="m:xref">
+      <xsl:attribute name="xref">
         <xsl:value-of select="@id"/>
       </xsl:attribute>
     </xsl:if>
@@ -867,11 +917,10 @@ an mo. Mixed content: mrow which contains mo + presentation elements -->
       <m:mo>
  <!-- HELM: added -->        
         <xsl:if test="($SEM_SW=$SEM_XREF or $SEM_SW=$SEM_XREF_EXT) and @id">
-          <xsl:attribute name="m:xref">
+          <xsl:attribute name="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>
@@ -880,7 +929,7 @@ an mo. Mixed content: mrow which contains mo + presentation elements -->
 <xsl:template match = "m:ident">
   <xsl:choose>
     <xsl:when test="($SEM_SW=$SEM_XREF or $SEM_SW=$SEM_XREF_EXT) and @id">
-      <m:mo m:xref="{@id}">id</m:mo>
+      <m:mo xref="{@id}">id</m:mo>
     </xsl:when>
     <xsl:otherwise>
       <m:mo>id</m:mo>
@@ -894,17 +943,15 @@ an mo. Mixed content: mrow which contains mo + presentation elements -->
 <xsl:template match = "m:apply[m:quotient[1]]">
   <m:mrow>
     <xsl:if test="($SEM_SW=$SEM_XREF or $SEM_SW=$SEM_XREF_EXT) and @id">
-      <xsl:attribute name="m:xref">
+      <xsl:attribute name="xref">
         <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">
-          <xsl:attribute name="m:xref">
+          <xsl:attribute name="xref">
             <xsl:value-of select="m:quotient/@id"/>
           </xsl:attribute>
         </xsl:if>
@@ -920,23 +967,21 @@ 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>
 
 <xsl:template match = "m:apply[*[1][self::m:exp]]">
   <m:msup>
     <xsl:if test="($SEM_SW=$SEM_XREF or $SEM_SW=$SEM_XREF_EXT) and @id">
-      <xsl:attribute name="m:xref">
+      <xsl:attribute name="xref">
         <xsl:value-of select="@id"/>
       </xsl:attribute>
     </xsl:if>
     <m:mo>
     <!-- HELM: added -->        
         <xsl:if test="($SEM_SW=$SEM_XREF or $SEM_SW=$SEM_XREF_EXT) and @id">
-          <xsl:attribute name="m:xref">
+          <xsl:attribute name="xref">
             <xsl:value-of select="m:exp/@id"/>
           </xsl:attribute>
         </xsl:if>e</m:mo>
@@ -947,7 +992,7 @@ an mo. Mixed content: mrow which contains mo + presentation elements -->
 <xsl:template match = "m:apply[m:factorial[1]]">
   <m:mrow>
     <xsl:if test="($SEM_SW=$SEM_XREF or $SEM_SW=$SEM_XREF_EXT) and @id">
-      <xsl:attribute name="m:xref">
+      <xsl:attribute name="xref">
         <xsl:value-of select="@id"/>
       </xsl:attribute>
     </xsl:if>
@@ -958,7 +1003,7 @@ an mo. Mixed content: mrow which contains mo + presentation elements -->
     <m:mo>
 <!-- HELM: added -->        
         <xsl:if test="($SEM_SW=$SEM_XREF or $SEM_SW=$SEM_XREF_EXT) and @id">
-          <xsl:attribute name="m:xref">
+          <xsl:attribute name="xref">
             <xsl:value-of select="m:factorial/@id"/>
           </xsl:attribute>
         </xsl:if>!</m:mo>
@@ -968,7 +1013,7 @@ an mo. Mixed content: mrow which contains mo + presentation elements -->
 <xsl:template match = "m:apply[m:max[1] | m:min[1]]">
   <m:mrow>
     <xsl:if test="($SEM_SW=$SEM_XREF or $SEM_SW=$SEM_XREF_EXT) and @id">
-      <xsl:attribute name="m:xref">
+      <xsl:attribute name="xref">
         <xsl:value-of select="@id"/>
       </xsl:attribute>
     </xsl:if>
@@ -978,7 +1023,7 @@ an mo. Mixed content: mrow which contains mo + presentation elements -->
           <m:mo>
 <!-- HELM: added -->        
         <xsl:if test="($SEM_SW=$SEM_XREF or $SEM_SW=$SEM_XREF_EXT) and @id">
-          <xsl:attribute name="m:xref">
+          <xsl:attribute name="xref">
             <xsl:value-of select="m:max/@id"/>
           </xsl:attribute>
         </xsl:if>max</m:mo>
@@ -987,7 +1032,7 @@ an mo. Mixed content: mrow which contains mo + presentation elements -->
           <m:mo>
 <!-- HELM: added -->        
         <xsl:if test="($SEM_SW=$SEM_XREF or $SEM_SW=$SEM_XREF_EXT) and @id">
-          <xsl:attribute name="m:xref">
+          <xsl:attribute name="xref">
             <xsl:value-of select="m:min/@id"/>
           </xsl:attribute>
         </xsl:if>min</m:mo>
@@ -1058,7 +1103,7 @@ an mo. Mixed content: mrow which contains mo + presentation elements -->
                                                         $PARAM=$PAR_SAME">
       <m:mfenced separators="">
         <xsl:if test="($SEM_SW=$SEM_XREF or $SEM_SW=$SEM_XREF_EXT) and @id">
-          <xsl:attribute name="m:xref">
+          <xsl:attribute name="xref">
             <xsl:value-of select="@id"/>
           </xsl:attribute>
         </xsl:if>
@@ -1081,7 +1126,7 @@ an mo. Mixed content: mrow which contains mo + presentation elements -->
     <xsl:otherwise>
       <m:mrow>
         <xsl:if test="($SEM_SW=$SEM_XREF or $SEM_SW=$SEM_XREF_EXT) and @id">
-          <xsl:attribute name="m:xref">
+          <xsl:attribute name="xref">
             <xsl:value-of select="@id"/>
           </xsl:attribute>
         </xsl:if>
@@ -1103,7 +1148,7 @@ an mo. Mixed content: mrow which contains mo + presentation elements -->
     <m:mo>
 <!-- HELM: added -->        
         <xsl:if test="($SEM_SW=$SEM_XREF or $SEM_SW=$SEM_XREF_EXT) and @id">
-          <xsl:attribute name="m:xref">
+          <xsl:attribute name="xref">
             <xsl:value-of select="m:minus/@id"/>
           </xsl:attribute>
         </xsl:if>-</m:mo>
@@ -1123,7 +1168,7 @@ an mo. Mixed content: mrow which contains mo + presentation elements -->
     <m:mo>
 <!-- HELM: added -->        
         <xsl:if test="($SEM_SW=$SEM_XREF or $SEM_SW=$SEM_XREF_EXT) and @id">
-          <xsl:attribute name="m:xref">
+          <xsl:attribute name="xref">
             <xsl:value-of select="m:minus/@id"/>
           </xsl:attribute>
         </xsl:if>-</m:mo>
@@ -1146,7 +1191,7 @@ an mo. Mixed content: mrow which contains mo + presentation elements -->
                                                       $PARAM=$PAR_SAME">
       <m:mfenced separators="">
         <xsl:if test="($SEM_SW=$SEM_XREF or $SEM_SW=$SEM_XREF_EXT) and @id">
-          <xsl:attribute name="m:xref">
+          <xsl:attribute name="xref">
             <xsl:value-of select="@id"/>
           </xsl:attribute>
         </xsl:if>
@@ -1169,7 +1214,7 @@ an mo. Mixed content: mrow which contains mo + presentation elements -->
     <xsl:otherwise>
       <m:mrow>
         <xsl:if test="($SEM_SW=$SEM_XREF or $SEM_SW=$SEM_XREF_EXT) and @id">
-          <xsl:attribute name="m:xref">
+          <xsl:attribute name="xref">
             <xsl:value-of select="@id"/>
           </xsl:attribute>
         </xsl:if>
@@ -1211,7 +1256,7 @@ an mo. Mixed content: mrow which contains mo + presentation elements -->
           <m:mo>
 <!-- HELM: added -->        
         <xsl:if test="($SEM_SW=$SEM_XREF or $SEM_SW=$SEM_XREF_EXT) and @id">
-          <xsl:attribute name="m:xref">
+          <xsl:attribute name="xref">
             <xsl:value-of select="../m:plus/@id"/>
           </xsl:attribute>
         </xsl:if>+</m:mo>
@@ -1239,7 +1284,7 @@ an mo. Mixed content: mrow which contains mo + presentation elements -->
     <xsl:otherwise>
       <m:msup>
         <xsl:if test="($SEM_SW=$SEM_XREF or $SEM_SW=$SEM_XREF_EXT) and @id">
-          <xsl:attribute name="m:xref">
+          <xsl:attribute name="xref">
             <xsl:value-of select="@id"/>
           </xsl:attribute>
         </xsl:if>
@@ -1263,7 +1308,7 @@ an mo. Mixed content: mrow which contains mo + presentation elements -->
                                                     $PARAM=$PAR_SAME">
       <m:mfenced separators="">
         <xsl:if test="($SEM_SW=$SEM_XREF or $SEM_SW=$SEM_XREF_EXT) and @id">
-          <xsl:attribute name="m:xref">
+          <xsl:attribute name="xref">
             <xsl:value-of select="@id"/>
           </xsl:attribute>
         </xsl:if>
@@ -1286,7 +1331,7 @@ an mo. Mixed content: mrow which contains mo + presentation elements -->
     <xsl:otherwise>
       <m:mrow>
         <xsl:if test="($SEM_SW=$SEM_XREF or $SEM_SW=$SEM_XREF_EXT) and @id">
-          <xsl:attribute name="m:xref">
+          <xsl:attribute name="xref">
             <xsl:value-of select="@id"/>
           </xsl:attribute>
         </xsl:if>
@@ -1314,7 +1359,7 @@ an mo. Mixed content: mrow which contains mo + presentation elements -->
     <xsl:if test="m:rem">
 <!-- HELM: added -->        
         <xsl:if test="($SEM_SW=$SEM_XREF or $SEM_SW=$SEM_XREF_EXT) and @id">
-          <xsl:attribute name="m:xref">
+          <xsl:attribute name="xref">
             <xsl:value-of select="m:rem/@id"/>
           </xsl:attribute>
         </xsl:if>
@@ -1323,7 +1368,7 @@ an mo. Mixed content: mrow which contains mo + presentation elements -->
     <xsl:if test="m:divide">
 <!-- HELM: added -->        
         <xsl:if test="($SEM_SW=$SEM_XREF or $SEM_SW=$SEM_XREF_EXT) and @id">
-          <xsl:attribute name="m:xref">
+          <xsl:attribute name="xref">
             <xsl:value-of select="m:divide/@id"/>
           </xsl:attribute>
         </xsl:if>
@@ -1348,7 +1393,7 @@ an mo. Mixed content: mrow which contains mo + presentation elements -->
                                                     $PARAM=$PAR_SAME">
       <m:mfenced separators="">
         <xsl:if test="($SEM_SW=$SEM_XREF or $SEM_SW=$SEM_XREF_EXT) and @id">
-          <xsl:attribute name="m:xref">
+          <xsl:attribute name="xref">
             <xsl:value-of select="@id"/>
           </xsl:attribute>
         </xsl:if>
@@ -1371,7 +1416,7 @@ an mo. Mixed content: mrow which contains mo + presentation elements -->
     <xsl:otherwise>
       <m:mrow>
         <xsl:if test="($SEM_SW=$SEM_XREF or $SEM_SW=$SEM_XREF_EXT) and @id">
-          <xsl:attribute name="m:xref">
+          <xsl:attribute name="xref">
             <xsl:value-of select="@id"/>
           </xsl:attribute>
         </xsl:if>
@@ -1398,11 +1443,11 @@ 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">
-          <xsl:attribute name="m:xref">
+          <xsl:attribute name="xref">
             <xsl:value-of select="../m:times/@id"/>
           </xsl:attribute>
         </xsl:if>*</m:mo>
@@ -1418,7 +1463,7 @@ an mo. Mixed content: mrow which contains mo + presentation elements -->
 <xsl:template match = "m:apply[m:root[1]]">
   <m:msqrt>
     <xsl:if test="($SEM_SW=$SEM_XREF or $SEM_SW=$SEM_XREF_EXT) and @id">
-      <xsl:attribute name="m:xref">
+      <xsl:attribute name="xref">
         <xsl:value-of select="@id"/>
       </xsl:attribute>
     </xsl:if>
@@ -1442,7 +1487,7 @@ an mo. Mixed content: mrow which contains mo + presentation elements -->
 <xsl:template match = "m:apply[m:gcd[1]]">
   <m:mrow>
     <xsl:if test="($SEM_SW=$SEM_XREF or $SEM_SW=$SEM_XREF_EXT) and @id">
-      <xsl:attribute name="m:xref">
+      <xsl:attribute name="xref">
         <xsl:value-of select="@id"/>
       </xsl:attribute>
     </xsl:if>
@@ -1450,7 +1495,7 @@ an mo. Mixed content: mrow which contains mo + presentation elements -->
       <m:mo>
 <!-- HELM: added -->        
         <xsl:if test="($SEM_SW=$SEM_XREF or $SEM_SW=$SEM_XREF_EXT) and @id">
-          <xsl:attribute name="m:xref">
+          <xsl:attribute name="xref">
             <xsl:value-of select="m:gcd/@id"/>
           </xsl:attribute>
         </xsl:if>gcd</m:mo>
@@ -1460,7 +1505,7 @@ an mo. Mixed content: mrow which contains mo + presentation elements -->
         <m:mo>
 <!-- HELM: added -->        
         <xsl:if test="($SEM_SW=$SEM_XREF or $SEM_SW=$SEM_XREF_EXT) and @id">
-          <xsl:attribute name="m:xref">
+          <xsl:attribute name="xref">
             <xsl:value-of select="m:gcd/@id"/>
           </xsl:attribute>
         </xsl:if>gcd</m:mo>
@@ -1483,7 +1528,7 @@ an mo. Mixed content: mrow which contains mo + presentation elements -->
     <xsl:when test="$IN_PREC &gt; $AND_PREC">
       <m:mfenced separators="">
         <xsl:if test="($SEM_SW=$SEM_XREF or $SEM_SW=$SEM_XREF_EXT) and @id">
-          <xsl:attribute name="m:xref">
+          <xsl:attribute name="xref">
             <xsl:value-of select="@id"/>
           </xsl:attribute>
         </xsl:if>
@@ -1505,7 +1550,7 @@ an mo. Mixed content: mrow which contains mo + presentation elements -->
     <xsl:otherwise>
       <m:mrow>
         <xsl:if test="($SEM_SW=$SEM_XREF or $SEM_SW=$SEM_XREF_EXT) and @id">
-          <xsl:attribute name="m:xref">
+          <xsl:attribute name="xref">
             <xsl:value-of select="@id"/>
           </xsl:attribute>
         </xsl:if>
@@ -1533,11 +1578,10 @@ an mo. Mixed content: mrow which contains mo + presentation elements -->
     <m:mo>
 <!-- HELM: added -->        
         <xsl:if test="($SEM_SW=$SEM_XREF or $SEM_SW=$SEM_XREF_EXT) and @id">
-          <xsl:attribute name="m:xref">
+          <xsl:attribute name="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"/>
@@ -1554,7 +1598,7 @@ an mo. Mixed content: mrow which contains mo + presentation elements -->
     <xsl:when test="$IN_PREC &gt; $OR_PREC">
       <m:mfenced separators="">
         <xsl:if test="($SEM_SW=$SEM_XREF or $SEM_SW=$SEM_XREF_EXT) and @id">
-          <xsl:attribute name="m:xref">
+          <xsl:attribute name="xref">
             <xsl:value-of select="@id"/>
           </xsl:attribute>
         </xsl:if>
@@ -1576,7 +1620,7 @@ an mo. Mixed content: mrow which contains mo + presentation elements -->
     <xsl:otherwise>
       <m:mrow>
         <xsl:if test="($SEM_SW=$SEM_XREF or $SEM_SW=$SEM_XREF_EXT) and @id">
-          <xsl:attribute name="m:xref">
+          <xsl:attribute name="xref">
             <xsl:value-of select="@id"/>
           </xsl:attribute>
         </xsl:if>
@@ -1604,11 +1648,10 @@ an mo. Mixed content: mrow which contains mo + presentation elements -->
     <m:mo> 
 <!-- HELM: added -->        
         <xsl:if test="($SEM_SW=$SEM_XREF or $SEM_SW=$SEM_XREF_EXT) and @id">
-          <xsl:attribute name="m:xref">
+          <xsl:attribute name="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"/>
@@ -1625,7 +1668,7 @@ an mo. Mixed content: mrow which contains mo + presentation elements -->
     <xsl:when test="$IN_PREC &gt; $XOR_PREC">
       <m:mfenced separators="">
         <xsl:if test="($SEM_SW=$SEM_XREF or $SEM_SW=$SEM_XREF_EXT) and @id">
-          <xsl:attribute name="m:xref">
+          <xsl:attribute name="xref">
             <xsl:value-of select="@id"/>
           </xsl:attribute>
         </xsl:if>
@@ -1646,7 +1689,7 @@ an mo. Mixed content: mrow which contains mo + presentation elements -->
     <xsl:otherwise>
       <m:mrow>
         <xsl:if test="($SEM_SW=$SEM_XREF or $SEM_SW=$SEM_XREF_EXT) and @id">
-          <xsl:attribute name="m:xref">
+          <xsl:attribute name="xref">
             <xsl:value-of select="@id"/>
           </xsl:attribute>
         </xsl:if>
@@ -1674,11 +1717,10 @@ an mo. Mixed content: mrow which contains mo + presentation elements -->
     <m:mo>
  <!-- HELM: added -->        
         <xsl:if test="($SEM_SW=$SEM_XREF or $SEM_SW=$SEM_XREF_EXT) and @id">
-          <xsl:attribute name="m:xref">
+          <xsl:attribute name="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"/>
@@ -1690,7 +1732,7 @@ an mo. Mixed content: mrow which contains mo + presentation elements -->
 <xsl:template match = "m:apply[m:not[1]]">
   <m:mrow>
     <xsl:if test="($SEM_SW=$SEM_XREF or $SEM_SW=$SEM_XREF_EXT) and @id">
-      <xsl:attribute name="m:xref">
+      <xsl:attribute name="xref">
         <xsl:value-of select="@id"/>
       </xsl:attribute>
     </xsl:if>
@@ -1698,10 +1740,10 @@ an mo. Mixed content: mrow which contains mo + presentation elements -->
     <m:mo>
 <!-- HELM: added -->        
         <xsl:if test="($SEM_SW=$SEM_XREF or $SEM_SW=$SEM_XREF_EXT) and @id">
-          <xsl:attribute name="m:xref">
+          <xsl:attribute name="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>
@@ -1711,14 +1753,14 @@ an mo. Mixed content: mrow which contains mo + presentation elements -->
 <xsl:template match = "m:apply[m:forall[1]]">
   <m:mrow>
     <xsl:if test="($SEM_SW=$SEM_XREF or $SEM_SW=$SEM_XREF_EXT) and @id">
-      <xsl:attribute name="m:xref">
+      <xsl:attribute name="xref">
         <xsl:value-of select="@id"/>
       </xsl:attribute>
     </xsl:if>
     <m:mo>
 <!-- HELM: added -->        
         <xsl:if test="($SEM_SW=$SEM_XREF or $SEM_SW=$SEM_XREF_EXT) and @id">
-          <xsl:attribute name="m:xref">
+          <xsl:attribute name="xref">
             <xsl:value-of select="m:forall/@id"/>
           </xsl:attribute>
         </xsl:if>for all</m:mo>
@@ -1745,18 +1787,17 @@ an mo. Mixed content: mrow which contains mo + presentation elements -->
 <xsl:template match = "m:apply[m:exists[1]]">
   <m:mrow>
     <xsl:if test="($SEM_SW=$SEM_XREF or $SEM_SW=$SEM_XREF_EXT) and @id">
-      <xsl:attribute name="m:xref">
+      <xsl:attribute name="xref">
         <xsl:value-of select="@id"/>
       </xsl:attribute>
     </xsl:if>
     <m:mo> 
 <!-- HELM: added -->        
         <xsl:if test="($SEM_SW=$SEM_XREF or $SEM_SW=$SEM_XREF_EXT) and @id">
-          <xsl:attribute name="m:xref">
+          <xsl:attribute name="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">
@@ -1783,7 +1824,7 @@ an mo. Mixed content: mrow which contains mo + presentation elements -->
   <xsl:if test="not(parent::m:apply[m:power[1]])">
     <m:mfenced open="|" close="|" separators="">
       <xsl:if test="($SEM_SW=$SEM_XREF or $SEM_SW=$SEM_XREF_EXT) and @id">
-        <xsl:attribute name="m:xref">
+        <xsl:attribute name="xref">
           <xsl:value-of select="@id"/>
         </xsl:attribute>
       </xsl:if>
@@ -1794,7 +1835,7 @@ an mo. Mixed content: mrow which contains mo + presentation elements -->
     <m:msup>
       <m:mfenced open="|" close="|" separators="">
         <xsl:if test="($SEM_SW=$SEM_XREF or $SEM_SW=$SEM_XREF_EXT) and @id">
-          <xsl:attribute name="m:xref">
+          <xsl:attribute name="xref">
             <xsl:value-of select="@id"/>
           </xsl:attribute>
         </xsl:if>
@@ -1808,7 +1849,7 @@ an mo. Mixed content: mrow which contains mo + presentation elements -->
 <xsl:template match = "m:apply[m:conjugate[1]]">
   <m:mover>
     <xsl:if test="($SEM_SW=$SEM_XREF or $SEM_SW=$SEM_XREF_EXT) and @id">
-      <xsl:attribute name="m:xref">
+      <xsl:attribute name="xref">
         <xsl:value-of select="@id"/>
       </xsl:attribute>
     </xsl:if>
@@ -1818,18 +1859,17 @@ an mo. Mixed content: mrow which contains mo + presentation elements -->
     <m:mo>
  <!-- HELM: added -->        
         <xsl:if test="($SEM_SW=$SEM_XREF or $SEM_SW=$SEM_XREF_EXT) and @id">
-          <xsl:attribute name="m:xref">
+          <xsl:attribute name="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>
 
 <xsl:template match = "m:apply[m:arg[1] | m:real[1] | m:imaginary[1]]">
   <m:mrow>
     <xsl:if test="($SEM_SW=$SEM_XREF or $SEM_SW=$SEM_XREF_EXT) and @id">
-      <xsl:attribute name="m:xref">
+      <xsl:attribute name="xref">
         <xsl:value-of select="@id"/>
       </xsl:attribute>
     </xsl:if>
@@ -1837,7 +1877,7 @@ an mo. Mixed content: mrow which contains mo + presentation elements -->
       <xsl:if test="m:arg">
 <!-- HELM: added -->        
         <xsl:if test="($SEM_SW=$SEM_XREF or $SEM_SW=$SEM_XREF_EXT) and @id">
-          <xsl:attribute name="m:xref">
+          <xsl:attribute name="xref">
             <xsl:value-of select="m:arg/@id"/>
           </xsl:attribute>
         </xsl:if>
@@ -1846,7 +1886,7 @@ an mo. Mixed content: mrow which contains mo + presentation elements -->
       <xsl:if test="m:real">
 <!-- HELM: added -->        
         <xsl:if test="($SEM_SW=$SEM_XREF or $SEM_SW=$SEM_XREF_EXT) and @id">
-          <xsl:attribute name="m:xref">
+          <xsl:attribute name="xref">
             <xsl:value-of select="m:real/@id"/>
           </xsl:attribute>
         </xsl:if>
@@ -1855,7 +1895,7 @@ an mo. Mixed content: mrow which contains mo + presentation elements -->
       <xsl:if test="m:imaginary">
 <!-- HELM: added -->        
         <xsl:if test="($SEM_SW=$SEM_XREF or $SEM_SW=$SEM_XREF_EXT) and @id">
-          <xsl:attribute name="m:xref">
+          <xsl:attribute name="xref">
             <xsl:value-of select="m:imaginary/@id"/>
           </xsl:attribute>
         </xsl:if>
@@ -1877,7 +1917,7 @@ an mo. Mixed content: mrow which contains mo + presentation elements -->
                      | m:geq | m:leq | m:equivalent]">
   <m:mrow>
     <xsl:if test="($SEM_SW=$SEM_XREF or $SEM_SW=$SEM_XREF_EXT) and @id">
-      <xsl:attribute name="m:xref">
+      <xsl:attribute name="xref">
         <xsl:value-of select="@id"/>
       </xsl:attribute>
     </xsl:if>
@@ -1889,74 +1929,74 @@ an mo. Mixed content: mrow which contains mo + presentation elements -->
         <xsl:if test="*[1]=m:neq">
 <!-- HELM: added -->        
         <xsl:if test="($SEM_SW=$SEM_XREF or $SEM_SW=$SEM_XREF_EXT) and @id">
-          <xsl:attribute name="m:xref">
+          <xsl:attribute name="xref">
             <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 -->        
         <xsl:if test="($SEM_SW=$SEM_XREF or $SEM_SW=$SEM_XREF_EXT) and @id">
-          <xsl:attribute name="m:xref">
+          <xsl:attribute name="xref">
             <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 -->        
         <xsl:if test="($SEM_SW=$SEM_XREF or $SEM_SW=$SEM_XREF_EXT) and @id">
-          <xsl:attribute name="m:xref">
+          <xsl:attribute name="xref">
             <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 -->        
         <xsl:if test="($SEM_SW=$SEM_XREF or $SEM_SW=$SEM_XREF_EXT) and @id">
-          <xsl:attribute name="m:xref">
+          <xsl:attribute name="xref">
             <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 -->        
         <xsl:if test="($SEM_SW=$SEM_XREF or $SEM_SW=$SEM_XREF_EXT) and @id">
-          <xsl:attribute name="m:xref">
+          <xsl:attribute name="xref">
             <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 -->        
         <xsl:if test="($SEM_SW=$SEM_XREF or $SEM_SW=$SEM_XREF_EXT) and @id">
-          <xsl:attribute name="m:xref">
+          <xsl:attribute name="xref">
             <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 -->        
         <xsl:if test="($SEM_SW=$SEM_XREF or $SEM_SW=$SEM_XREF_EXT) and @id">
-          <xsl:attribute name="m:xref">
+          <xsl:attribute name="xref">
             <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 -->        
         <xsl:if test="($SEM_SW=$SEM_XREF or $SEM_SW=$SEM_XREF_EXT) and @id">
-          <xsl:attribute name="m:xref">
+          <xsl:attribute name="xref">
             <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"/>
@@ -1964,7 +2004,7 @@ an mo. Mixed content: mrow which contains mo + presentation elements -->
         <m:mo>
 <!-- HELM: added -->        
         <xsl:if test="($SEM_SW=$SEM_XREF or $SEM_SW=$SEM_XREF_EXT) and @id">
-          <xsl:attribute name="m:xref">
+          <xsl:attribute name="xref">
             <xsl:value-of select="m:tendsto/@id"/>
           </xsl:attribute>
         </xsl:if>-</m:mo>
@@ -1973,7 +2013,7 @@ an mo. Mixed content: mrow which contains mo + presentation elements -->
         <m:mo>
 <!-- HELM: added -->        
         <xsl:if test="($SEM_SW=$SEM_XREF or $SEM_SW=$SEM_XREF_EXT) and @id">
-          <xsl:attribute name="m:xref">
+          <xsl:attribute name="xref">
             <xsl:value-of select="m:tendsto/@id"/>
           </xsl:attribute>
         </xsl:if>+</m:mo>
@@ -1987,25 +2027,25 @@ an mo. Mixed content: mrow which contains mo + presentation elements -->
           <xsl:if test="../*[self::m:subset][1]">
 <!-- HELM: added -->        
         <xsl:if test="($SEM_SW=$SEM_XREF or $SEM_SW=$SEM_XREF_EXT) and @id">
-          <xsl:attribute name="m:xref">
+          <xsl:attribute name="xref">
             <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 -->        
         <xsl:if test="($SEM_SW=$SEM_XREF or $SEM_SW=$SEM_XREF_EXT) and @id">
-          <xsl:attribute name="m:xref">
+          <xsl:attribute name="xref">
             <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 -->        
         <xsl:if test="($SEM_SW=$SEM_XREF or $SEM_SW=$SEM_XREF_EXT) and @id">
-          <xsl:attribute name="m:xref">
+          <xsl:attribute name="xref">
             <xsl:value-of select="../m:eq/@id"/>
           </xsl:attribute>
         </xsl:if>
@@ -2014,7 +2054,7 @@ an mo. Mixed content: mrow which contains mo + presentation elements -->
           <xsl:if test="../*[self::m:gt][1]">
 <!-- HELM: added -->        
         <xsl:if test="($SEM_SW=$SEM_XREF or $SEM_SW=$SEM_XREF_EXT) and @id">
-          <xsl:attribute name="m:xref">
+          <xsl:attribute name="xref">
             <xsl:value-of select="../m:gt/@id"/>
           </xsl:attribute>
         </xsl:if>
@@ -2023,7 +2063,7 @@ an mo. Mixed content: mrow which contains mo + presentation elements -->
           <xsl:if test="../*[self::m:lt][1]">
 <!-- HELM: added -->        
         <xsl:if test="($SEM_SW=$SEM_XREF or $SEM_SW=$SEM_XREF_EXT) and @id">
-          <xsl:attribute name="m:xref">
+          <xsl:attribute name="xref">
             <xsl:value-of select="../m:lt/@id"/>
           </xsl:attribute>
         </xsl:if>
@@ -2032,29 +2072,29 @@ an mo. Mixed content: mrow which contains mo + presentation elements -->
           <xsl:if test="../*[self::m:geq][1]">
 <!-- HELM: added -->        
         <xsl:if test="($SEM_SW=$SEM_XREF or $SEM_SW=$SEM_XREF_EXT) and @id">
-          <xsl:attribute name="m:xref">
+          <xsl:attribute name="xref">
             <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 -->        
         <xsl:if test="($SEM_SW=$SEM_XREF or $SEM_SW=$SEM_XREF_EXT) and @id">
-          <xsl:attribute name="m:xref">
+          <xsl:attribute name="xref">
             <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 -->        
         <xsl:if test="($SEM_SW=$SEM_XREF or $SEM_SW=$SEM_XREF_EXT) and @id">
-          <xsl:attribute name="m:xref">
+          <xsl:attribute name="xref">
             <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"/>
@@ -2069,7 +2109,7 @@ an mo. Mixed content: mrow which contains mo + presentation elements -->
 <xsl:template match = "m:apply[*[1][self::m:ln]]">
   <m:mrow>
     <xsl:if test="($SEM_SW=$SEM_XREF or $SEM_SW=$SEM_XREF_EXT) and @id">
-      <xsl:attribute name="m:xref">
+      <xsl:attribute name="xref">
         <xsl:value-of select="@id"/>
       </xsl:attribute>
     </xsl:if>
@@ -2079,7 +2119,7 @@ an mo. Mixed content: mrow which contains mo + presentation elements -->
           <m:mo>
 <!-- HELM: added -->        
         <xsl:if test="($SEM_SW=$SEM_XREF or $SEM_SW=$SEM_XREF_EXT) and @id">
-          <xsl:attribute name="m:xref">
+          <xsl:attribute name="xref">
             <xsl:value-of select="m:ln/@id"/>
           </xsl:attribute>
         </xsl:if>ln</m:mo>
@@ -2090,13 +2130,13 @@ an mo. Mixed content: mrow which contains mo + presentation elements -->
         <m:mo>
 <!-- HELM: added -->        
         <xsl:if test="($SEM_SW=$SEM_XREF or $SEM_SW=$SEM_XREF_EXT) and @id">
-          <xsl:attribute name="m:xref">
+          <xsl:attribute name="xref">
             <xsl:value-of select="m:ln/@id"/>
           </xsl:attribute>
         </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>
@@ -2106,7 +2146,7 @@ an mo. Mixed content: mrow which contains mo + presentation elements -->
 <xsl:template match = "m:apply[m:log[1]]">
   <m:mrow>
     <xsl:if test="($SEM_SW=$SEM_XREF or $SEM_SW=$SEM_XREF_EXT) and @id">
-      <xsl:attribute name="m:xref">
+      <xsl:attribute name="xref">
         <xsl:value-of select="@id"/>
       </xsl:attribute>
     </xsl:if>
@@ -2117,7 +2157,7 @@ an mo. Mixed content: mrow which contains mo + presentation elements -->
             <m:mo>
 <!-- HELM: added -->        
         <xsl:if test="($SEM_SW=$SEM_XREF or $SEM_SW=$SEM_XREF_EXT) and @id">
-          <xsl:attribute name="m:xref">
+          <xsl:attribute name="xref">
             <xsl:value-of select="m:log/@id"/>
           </xsl:attribute>
         </xsl:if>log</m:mo>
@@ -2129,7 +2169,7 @@ an mo. Mixed content: mrow which contains mo + presentation elements -->
             <m:mo>
 <!-- HELM: added -->        
         <xsl:if test="($SEM_SW=$SEM_XREF or $SEM_SW=$SEM_XREF_EXT) and @id">
-          <xsl:attribute name="m:xref">
+          <xsl:attribute name="xref">
             <xsl:value-of select="m:log/@id"/>
           </xsl:attribute>
         </xsl:if>log</m:mo>
@@ -2147,7 +2187,7 @@ an mo. Mixed content: mrow which contains mo + presentation elements -->
             <m:mo>
 <!-- HELM: added -->        
         <xsl:if test="($SEM_SW=$SEM_XREF or $SEM_SW=$SEM_XREF_EXT) and @id">
-          <xsl:attribute name="m:xref">
+          <xsl:attribute name="xref">
             <xsl:value-of select="m:log/@id"/>
           </xsl:attribute>
         </xsl:if>log</m:mo>
@@ -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"/>
@@ -2173,7 +2213,7 @@ an mo. Mixed content: mrow which contains mo + presentation elements -->
 <xsl:template match = "m:apply[m:diff[1]]">
   <m:mrow>
     <xsl:if test="($SEM_SW=$SEM_XREF or $SEM_SW=$SEM_XREF_EXT) and @id">
-      <xsl:attribute name="m:xref">
+      <xsl:attribute name="xref">
         <xsl:value-of select="@id"/>
       </xsl:attribute>
     </xsl:if>
@@ -2181,7 +2221,7 @@ an mo. Mixed content: mrow which contains mo + presentation elements -->
       <m:mfrac>
 <!-- HELM: added -->        
         <xsl:if test="($SEM_SW=$SEM_XREF or $SEM_SW=$SEM_XREF_EXT) and @id">
-          <xsl:attribute name="m:xref">
+          <xsl:attribute name="xref">
             <xsl:value-of select="m:diff/@id"/>
           </xsl:attribute>
         </xsl:if>
@@ -2202,7 +2242,7 @@ an mo. Mixed content: mrow which contains mo + presentation elements -->
       <m:mfrac>
 <!-- HELM: added -->        
         <xsl:if test="($SEM_SW=$SEM_XREF or $SEM_SW=$SEM_XREF_EXT) and @id">
-          <xsl:attribute name="m:xref">
+          <xsl:attribute name="xref">
             <xsl:value-of select="m:diff/@id"/>
           </xsl:attribute>
         </xsl:if>
@@ -2220,7 +2260,7 @@ an mo. Mixed content: mrow which contains mo + presentation elements -->
 <xsl:template match = "m:apply[m:partialdiff[1]]">
   <m:mrow>
     <xsl:if test="($SEM_SW=$SEM_XREF or $SEM_SW=$SEM_XREF_EXT) and @id">
-      <xsl:attribute name="m:xref">
+      <xsl:attribute name="xref">
         <xsl:value-of select="@id"/>
       </xsl:attribute>
     </xsl:if>
@@ -2229,7 +2269,7 @@ an mo. Mixed content: mrow which contains mo + presentation elements -->
         <m:mfrac>
 <!-- HELM: added -->        
         <xsl:if test="($SEM_SW=$SEM_XREF or $SEM_SW=$SEM_XREF_EXT) and @id">
-          <xsl:attribute name="m:xref">
+          <xsl:attribute name="xref">
             <xsl:value-of select="m:partialdiff/@id"/>
           </xsl:attribute>
         </xsl:if>
@@ -2250,7 +2290,7 @@ an mo. Mixed content: mrow which contains mo + presentation elements -->
         <m:mfrac>
 <!-- HELM: added -->        
         <xsl:if test="($SEM_SW=$SEM_XREF or $SEM_SW=$SEM_XREF_EXT) and @id">
-          <xsl:attribute name="m:xref">
+          <xsl:attribute name="xref">
             <xsl:value-of select="m:partialdiff/@id"/>
           </xsl:attribute>
         </xsl:if>
@@ -2274,7 +2314,7 @@ an mo. Mixed content: mrow which contains mo + presentation elements -->
 <xsl:template match = "m:apply[m:divergence[1] | m:grad[1] | m:curl[1]]">
   <m:mrow>
     <xsl:if test="($SEM_SW=$SEM_XREF or $SEM_SW=$SEM_XREF_EXT) and @id">
-      <xsl:attribute name="m:xref">
+      <xsl:attribute name="xref">
         <xsl:value-of select="@id"/>
       </xsl:attribute>
     </xsl:if>
@@ -2282,7 +2322,7 @@ an mo. Mixed content: mrow which contains mo + presentation elements -->
       <xsl:if test="*[1]=m:divergence">
 <!-- HELM: added -->        
         <xsl:if test="($SEM_SW=$SEM_XREF or $SEM_SW=$SEM_XREF_EXT) and @id">
-          <xsl:attribute name="m:xref">
+          <xsl:attribute name="xref">
             <xsl:value-of select="m:divergence/@id"/>
           </xsl:attribute>
         </xsl:if>
@@ -2291,7 +2331,7 @@ an mo. Mixed content: mrow which contains mo + presentation elements -->
       <xsl:if test="*[1]=m:grad">
 <!-- HELM: added -->        
         <xsl:if test="($SEM_SW=$SEM_XREF or $SEM_SW=$SEM_XREF_EXT) and @id">
-          <xsl:attribute name="m:xref">
+          <xsl:attribute name="xref">
             <xsl:value-of select="m:grad/@id"/>
           </xsl:attribute>
         </xsl:if>
@@ -2300,7 +2340,7 @@ an mo. Mixed content: mrow which contains mo + presentation elements -->
       <xsl:if test="*[1]=m:curl">
 <!-- HELM: added -->        
         <xsl:if test="($SEM_SW=$SEM_XREF or $SEM_SW=$SEM_XREF_EXT) and @id">
-          <xsl:attribute name="m:xref">
+          <xsl:attribute name="xref">
             <xsl:value-of select="m:curl/@id"/>
           </xsl:attribute>
         </xsl:if>
@@ -2323,18 +2363,18 @@ an mo. Mixed content: mrow which contains mo + presentation elements -->
 <xsl:template match = "m:apply[m:laplacian[1]]">
   <m:mrow>
     <xsl:if test="($SEM_SW=$SEM_XREF or $SEM_SW=$SEM_XREF_EXT) and @id">
-      <xsl:attribute name="m:xref">
+      <xsl:attribute name="xref">
         <xsl:value-of select="@id"/>
       </xsl:attribute>
     </xsl:if>
     <m:msup>
 <!-- HELM: added -->        
         <xsl:if test="($SEM_SW=$SEM_XREF or $SEM_SW=$SEM_XREF_EXT) and @id">
-          <xsl:attribute name="m:xref">
+          <xsl:attribute name="xref">
             <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"/>
@@ -2347,7 +2387,7 @@ an mo. Mixed content: mrow which contains mo + presentation elements -->
 <xsl:template match = "m:set | m:list">
   <m:mfenced open="{{" close="}}" separators="">
     <xsl:if test="($SEM_SW=$SEM_XREF or $SEM_SW=$SEM_XREF_EXT) and @id">
-      <xsl:attribute name="m:xref">
+      <xsl:attribute name="xref">
         <xsl:value-of select="@id"/>
       </xsl:attribute>
     </xsl:if>
@@ -2385,7 +2425,7 @@ an mo. Mixed content: mrow which contains mo + presentation elements -->
                     and $PARAM=$PAR_SAME">
       <m:mfenced separators="">
         <xsl:if test="($SEM_SW=$SEM_XREF or $SEM_SW=$SEM_XREF_EXT) and @id">
-          <xsl:attribute name="m:xref">
+          <xsl:attribute name="xref">
             <xsl:value-of select="@id"/>
           </xsl:attribute>
         </xsl:if>
@@ -2408,7 +2448,7 @@ an mo. Mixed content: mrow which contains mo + presentation elements -->
     <xsl:otherwise>
       <m:mrow>
         <xsl:if test="($SEM_SW=$SEM_XREF or $SEM_SW=$SEM_XREF_EXT) and @id">
-          <xsl:attribute name="m:xref">
+          <xsl:attribute name="xref">
             <xsl:value-of select="@id"/>
           </xsl:attribute>
         </xsl:if>
@@ -2436,11 +2476,10 @@ an mo. Mixed content: mrow which contains mo + presentation elements -->
     <m:mo>
 <!-- HELM: added -->        
         <xsl:if test="($SEM_SW=$SEM_XREF or $SEM_SW=$SEM_XREF_EXT) and @id">
-          <xsl:attribute name="m:xref">
+          <xsl:attribute name="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"/>
@@ -2458,7 +2497,7 @@ an mo. Mixed content: mrow which contains mo + presentation elements -->
     <xsl:when test="$IN_PREC &gt; $INTERSECT_PREC">
       <m:mfenced separators="">
         <xsl:if test="($SEM_SW=$SEM_XREF or $SEM_SW=$SEM_XREF_EXT) and @id">
-          <xsl:attribute name="m:xref">
+          <xsl:attribute name="xref">
             <xsl:value-of select="@id"/>
           </xsl:attribute>
         </xsl:if>
@@ -2481,7 +2520,7 @@ an mo. Mixed content: mrow which contains mo + presentation elements -->
     <xsl:otherwise>
       <m:mrow>
         <xsl:if test="($SEM_SW=$SEM_XREF or $SEM_SW=$SEM_XREF_EXT) and @id">
-          <xsl:attribute name="m:xref">
+          <xsl:attribute name="xref">
             <xsl:value-of select="@id"/>
           </xsl:attribute>
         </xsl:if>
@@ -2509,11 +2548,10 @@ an mo. Mixed content: mrow which contains mo + presentation elements -->
     <m:mo>
 <!-- HELM: added -->        
         <xsl:if test="($SEM_SW=$SEM_XREF or $SEM_SW=$SEM_XREF_EXT) and @id">
-          <xsl:attribute name="m:xref">
+          <xsl:attribute name="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"/>
@@ -2532,7 +2570,7 @@ an mo. Mixed content: mrow which contains mo + presentation elements -->
                     and $PARAM=$PAR_SAME">
       <m:mfenced separators="">
         <xsl:if test="($SEM_SW=$SEM_XREF or $SEM_SW=$SEM_XREF_EXT) and @id">
-          <xsl:attribute name="m:xref">
+          <xsl:attribute name="xref">
             <xsl:value-of select="@id"/>
           </xsl:attribute>
         </xsl:if>
@@ -2555,7 +2593,7 @@ an mo. Mixed content: mrow which contains mo + presentation elements -->
     <xsl:otherwise>
       <m:mrow>
         <xsl:if test="($SEM_SW=$SEM_XREF or $SEM_SW=$SEM_XREF_EXT) and @id">
-          <xsl:attribute name="m:xref">
+          <xsl:attribute name="xref">
             <xsl:value-of select="@id"/>
           </xsl:attribute>
         </xsl:if>
@@ -2582,7 +2620,7 @@ an mo. Mixed content: mrow which contains mo + presentation elements -->
   <m:mo>
 <!-- HELM: added -->        
         <xsl:if test="($SEM_SW=$SEM_XREF or $SEM_SW=$SEM_XREF_EXT) and @id">
-          <xsl:attribute name="m:xref">
+          <xsl:attribute name="xref">
             <xsl:value-of select="m:setdiff/@id"/>
           </xsl:attribute>
         </xsl:if>\</m:mo>
@@ -2597,7 +2635,7 @@ an mo. Mixed content: mrow which contains mo + presentation elements -->
 <xsl:template match = "m:apply[m:card[1]]">
   <m:mfenced open="|" close="|" separators=",">
     <xsl:if test="($SEM_SW=$SEM_XREF or $SEM_SW=$SEM_XREF_EXT) and @id">
-      <xsl:attribute name="m:xref">
+      <xsl:attribute name="xref">
         <xsl:value-of select="@id"/>
       </xsl:attribute>
     </xsl:if>
@@ -2613,7 +2651,7 @@ an mo. Mixed content: mrow which contains mo + presentation elements -->
 <xsl:template match = "m:apply[m:sum[1] | m:product[1]]">
   <m:mrow>
     <xsl:if test="($SEM_SW=$SEM_XREF or $SEM_SW=$SEM_XREF_EXT) and @id">
-      <xsl:attribute name="m:xref">
+      <xsl:attribute name="xref">
         <xsl:value-of select="@id"/>
       </xsl:attribute>
     </xsl:if>
@@ -2624,20 +2662,20 @@ an mo. Mixed content: mrow which contains mo + presentation elements -->
             <xsl:if test="*[1]=m:sum">
 <!-- HELM: added -->        
         <xsl:if test="($SEM_SW=$SEM_XREF or $SEM_SW=$SEM_XREF_EXT) and @id">
-          <xsl:attribute name="m:xref">
+          <xsl:attribute name="xref">
             <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 -->        
         <xsl:if test="($SEM_SW=$SEM_XREF or $SEM_SW=$SEM_XREF_EXT) and @id">
-          <xsl:attribute name="m:xref">
+          <xsl:attribute name="xref">
             <xsl:value-of select="m:product/@id"/>
           </xsl:attribute>
         </xsl:if>
-              <m:mchar name="Product"/>
+        &#x0220F;
             </xsl:if>
           </m:mo>
           <m:mrow>
@@ -2655,20 +2693,20 @@ an mo. Mixed content: mrow which contains mo + presentation elements -->
             <xsl:if test="*[1]=m:sum">
 <!-- HELM: added -->        
         <xsl:if test="($SEM_SW=$SEM_XREF or $SEM_SW=$SEM_XREF_EXT) and @id">
-          <xsl:attribute name="m:xref">
+          <xsl:attribute name="xref">
             <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 -->        
         <xsl:if test="($SEM_SW=$SEM_XREF or $SEM_SW=$SEM_XREF_EXT) and @id">
-          <xsl:attribute name="m:xref">
+          <xsl:attribute name="xref">
             <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"/>
@@ -2682,7 +2720,7 @@ an mo. Mixed content: mrow which contains mo + presentation elements -->
 <xsl:template match = "m:apply[m:limit[1]]">
   <m:mrow>
     <xsl:if test="($SEM_SW=$SEM_XREF or $SEM_SW=$SEM_XREF_EXT) and @id">
-      <xsl:attribute name="m:xref">
+      <xsl:attribute name="xref">
         <xsl:value-of select="@id"/>
       </xsl:attribute>
     </xsl:if>
@@ -2690,14 +2728,14 @@ an mo. Mixed content: mrow which contains mo + presentation elements -->
       <m:mo>
 <!-- HELM: added -->        
         <xsl:if test="($SEM_SW=$SEM_XREF or $SEM_SW=$SEM_XREF_EXT) and @id">
-          <xsl:attribute name="m:xref">
+          <xsl:attribute name="xref">
             <xsl:value-of select="m:lim/@id"/>
           </xsl:attribute>
         </xsl:if>lim</m:mo>
       <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">
@@ -2720,7 +2758,7 @@ an mo. Mixed content: mrow which contains mo + presentation elements -->
                        self::m:arctan]]">
   <m:mrow>
     <xsl:if test="($SEM_SW=$SEM_XREF or $SEM_SW=$SEM_XREF_EXT) and @id">
-      <xsl:attribute name="m:xref">
+      <xsl:attribute name="xref">
         <xsl:value-of select="@id"/>
       </xsl:attribute>
     </xsl:if>
@@ -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"/>
@@ -2744,7 +2782,7 @@ an mo. Mixed content: mrow which contains mo + presentation elements -->
 <xsl:template match = "*" mode="trigonometry">
   <m:mo>
     <xsl:if test="($SEM_SW=$SEM_XREF or $SEM_SW=$SEM_XREF_EXT) and @id">
-      <xsl:attribute name="m:xref">
+      <xsl:attribute name="xref">
         <xsl:value-of select="@id"/>
       </xsl:attribute>
     </xsl:if>
@@ -2804,7 +2842,7 @@ an mo. Mixed content: mrow which contains mo + presentation elements -->
 <xsl:template match = "m:apply[m:mean[1]]">
   <m:mfenced open="&lt;" close="&gt;" separators=",">
     <xsl:if test="($SEM_SW=$SEM_XREF or $SEM_SW=$SEM_XREF_EXT) and @id">
-      <xsl:attribute name="m:xref">
+      <xsl:attribute name="xref">
         <xsl:value-of select="@id"/>
       </xsl:attribute>
     </xsl:if>
@@ -2817,18 +2855,17 @@ an mo. Mixed content: mrow which contains mo + presentation elements -->
 <xsl:template match = "m:apply[m:sdev[1]]">
   <m:mrow>
     <xsl:if test="($SEM_SW=$SEM_XREF or $SEM_SW=$SEM_XREF_EXT) and @id">
-      <xsl:attribute name="m:xref">
+      <xsl:attribute name="xref">
         <xsl:value-of select="@id"/>
       </xsl:attribute>
     </xsl:if>
     <m:mo>
 <!-- HELM: added -->        
         <xsl:if test="($SEM_SW=$SEM_XREF or $SEM_SW=$SEM_XREF_EXT) and @id">
-          <xsl:attribute name="m:xref">
+          <xsl:attribute name="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"/>
@@ -2840,18 +2877,17 @@ an mo. Mixed content: mrow which contains mo + presentation elements -->
 <xsl:template match = "m:apply[m:variance[1]]">
   <m:mrow>
     <xsl:if test="($SEM_SW=$SEM_XREF or $SEM_SW=$SEM_XREF_EXT) and @id">
-      <xsl:attribute name="m:xref">
+      <xsl:attribute name="xref">
         <xsl:value-of select="@id"/>
       </xsl:attribute>
     </xsl:if>
     <m:mo>
 <!-- HELM: added -->        
         <xsl:if test="($SEM_SW=$SEM_XREF or $SEM_SW=$SEM_XREF_EXT) and @id">
-          <xsl:attribute name="m:xref">
+          <xsl:attribute name="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]">
@@ -2866,14 +2902,14 @@ an mo. Mixed content: mrow which contains mo + presentation elements -->
 <xsl:template match = "m:apply[m:median[1]]">
   <m:mrow>
     <xsl:if test="($SEM_SW=$SEM_XREF or $SEM_SW=$SEM_XREF_EXT) and @id">
-      <xsl:attribute name="m:xref">
+      <xsl:attribute name="xref">
         <xsl:value-of select="@id"/>
       </xsl:attribute>
     </xsl:if>
     <m:mo>
 <!-- HELM: added -->        
         <xsl:if test="($SEM_SW=$SEM_XREF or $SEM_SW=$SEM_XREF_EXT) and @id">
-          <xsl:attribute name="m:xref">
+          <xsl:attribute name="xref">
             <xsl:value-of select="m:median/@id"/>
           </xsl:attribute>
         </xsl:if>median</m:mo>
@@ -2888,14 +2924,14 @@ an mo. Mixed content: mrow which contains mo + presentation elements -->
 <xsl:template match = "m:apply[m:mode[1]]">
   <m:mrow>
     <xsl:if test="($SEM_SW=$SEM_XREF or $SEM_SW=$SEM_XREF_EXT) and @id">
-      <xsl:attribute name="m:xref">
+      <xsl:attribute name="xref">
         <xsl:value-of select="@id"/>
       </xsl:attribute>
     </xsl:if>
     <m:mo>
 <!-- HELM: added -->        
         <xsl:if test="($SEM_SW=$SEM_XREF or $SEM_SW=$SEM_XREF_EXT) and @id">
-          <xsl:attribute name="m:xref">
+          <xsl:attribute name="xref">
             <xsl:value-of select="m:mode/@id"/>
           </xsl:attribute>
         </xsl:if>mode</m:mo>
@@ -2910,7 +2946,7 @@ an mo. Mixed content: mrow which contains mo + presentation elements -->
 <xsl:template match = "m:apply[m:moment[1]]">
   <m:mfenced open="&lt;" close="&gt;" separators="">
     <xsl:if test="($SEM_SW=$SEM_XREF or $SEM_SW=$SEM_XREF_EXT) and @id">
-      <xsl:attribute name="m:xref">
+      <xsl:attribute name="xref">
         <xsl:value-of select="@id"/>
       </xsl:attribute>
     </xsl:if>
@@ -2934,7 +2970,7 @@ an mo. Mixed content: mrow which contains mo + presentation elements -->
 <xsl:template match="m:vector">
   <m:mfenced separators="">
     <xsl:if test="($SEM_SW=$SEM_XREF or $SEM_SW=$SEM_XREF_EXT) and @id">
-      <xsl:attribute name="m:xref">
+      <xsl:attribute name="xref">
         <xsl:value-of select="@id"/>
       </xsl:attribute>
     </xsl:if>
@@ -2951,7 +2987,7 @@ an mo. Mixed content: mrow which contains mo + presentation elements -->
 <xsl:template match = "m:matrix">
   <m:mfenced separators="">
     <xsl:if test="($SEM_SW=$SEM_XREF or $SEM_SW=$SEM_XREF_EXT) and @id">
-      <xsl:attribute name="m:xref">
+      <xsl:attribute name="xref">
         <xsl:value-of select="@id"/>
       </xsl:attribute>
     </xsl:if>
@@ -2964,7 +3000,7 @@ an mo. Mixed content: mrow which contains mo + presentation elements -->
 <xsl:template match = "m:matrixrow">
   <m:mtr>
     <xsl:if test="($SEM_SW=$SEM_XREF or $SEM_SW=$SEM_XREF_EXT) and @id">
-      <xsl:attribute name="m:xref">
+      <xsl:attribute name="xref">
         <xsl:value-of select="@id"/>
       </xsl:attribute>
     </xsl:if>
@@ -2979,14 +3015,14 @@ an mo. Mixed content: mrow which contains mo + presentation elements -->
 <xsl:template match = "m:apply[m:determinant[1]]">
   <m:mrow>
     <xsl:if test="($SEM_SW=$SEM_XREF or $SEM_SW=$SEM_XREF_EXT) and @id">
-      <xsl:attribute name="m:xref">
+      <xsl:attribute name="xref">
         <xsl:value-of select="@id"/>
       </xsl:attribute>
     </xsl:if>
     <m:mo>
 <!-- HELM: added -->        
         <xsl:if test="($SEM_SW=$SEM_XREF or $SEM_SW=$SEM_XREF_EXT) and @id">
-          <xsl:attribute name="m:xref">
+          <xsl:attribute name="xref">
             <xsl:value-of select="m:determinant/@id"/>
           </xsl:attribute>
         </xsl:if>det</m:mo>
@@ -2997,7 +3033,7 @@ an mo. Mixed content: mrow which contains mo + presentation elements -->
 <xsl:template match = "m:apply[m:transpose[1]]">
   <m:msup>
     <xsl:if test="($SEM_SW=$SEM_XREF or $SEM_SW=$SEM_XREF_EXT) and @id">
-      <xsl:attribute name="m:xref">
+      <xsl:attribute name="xref">
         <xsl:value-of select="@id"/>
       </xsl:attribute>
     </xsl:if>
@@ -3005,7 +3041,7 @@ an mo. Mixed content: mrow which contains mo + presentation elements -->
     <m:mo>
 <!-- HELM: added -->        
         <xsl:if test="($SEM_SW=$SEM_XREF or $SEM_SW=$SEM_XREF_EXT) and @id">
-          <xsl:attribute name="m:xref">
+          <xsl:attribute name="xref">
             <xsl:value-of select="m:transpose/@id"/>
           </xsl:attribute>
         </xsl:if>T</m:mo>
@@ -3035,7 +3071,7 @@ an mo. Mixed content: mrow which contains mo + presentation elements -->
                                  m:scalarproduct[1] | m:outerproduct[1]]">
   <m:mrow>
     <xsl:if test="($SEM_SW=$SEM_XREF or $SEM_SW=$SEM_XREF_EXT) and @id">
-      <xsl:attribute name="m:xref">
+      <xsl:attribute name="xref">
         <xsl:value-of select="@id"/>
       </xsl:attribute>
     </xsl:if>
@@ -3044,16 +3080,16 @@ an mo. Mixed content: mrow which contains mo + presentation elements -->
       <xsl:if test="m:vectorproduct[1]">
 <!-- HELM: added -->        
         <xsl:if test="($SEM_SW=$SEM_XREF or $SEM_SW=$SEM_XREF_EXT) and @id">
-          <xsl:attribute name="m:xref">
+          <xsl:attribute name="xref">
             <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 -->        
         <xsl:if test="($SEM_SW=$SEM_XREF or $SEM_SW=$SEM_XREF_EXT) and @id">
-          <xsl:attribute name="m:xref">
+          <xsl:attribute name="xref">
             <xsl:value-of select="*[1]/@id"/>
           </xsl:attribute>
         </xsl:if>