]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/style/mmlctop.xsl-0.14
Initial revision
[helm.git] / helm / style / mmlctop.xsl-0.14
index 693f962a387a15db6903ef6cf9bbeb12d57801ff..1568e1da2deefc9818f6aab66c4adbf80a2c176d 100755 (executable)
@@ -19,7 +19,7 @@
 <!--  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
@@ -251,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]"/>
@@ -309,7 +313,7 @@ LINEAR ALGEBRA
                                                    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>
@@ -332,7 +336,7 @@ LINEAR ALGEBRA
   </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="*"/>
@@ -453,13 +457,13 @@ HELM: Now is: -->
 <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>
@@ -474,7 +478,7 @@ HELM: Now is: -->
       </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">
@@ -492,13 +496,13 @@ HELM: Now is: -->
       </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>
@@ -509,7 +513,7 @@ HELM: Now is: -->
       </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>&#x02062;</m:mo>
         <m:mfenced separators=",">
@@ -519,7 +523,7 @@ HELM: Now is: -->
       </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>&#x02062;</m:mo>
@@ -534,7 +538,7 @@ HELM: Now is: -->
    <xsl:otherwise>
     <xsl:choose>
      <xsl:when test="child::text() and not(*[1])">
-      <m:mn m:xref="{$id}"> <xsl:apply-templates mode = "semantics"/> </m:mn>
+      <m:mn xref="{@id}"> <xsl:apply-templates mode = "semantics"/> </m:mn>
      </xsl:when>
      <xsl:otherwise>
       <xsl:variable name="id" select="@id"/>
@@ -542,7 +546,7 @@ HELM: Now is: -->
        <xsl:when test="not(*[2])">
         <xsl:for-each select="*[1]">
          <xsl:copy>
-          <xsl:attribute name="m:xref">
+          <xsl:attribute name="xref">
            <xsl:value-of select="$id"/>
           </xsl:attribute>
           <xsl:copy-of select="@*|*"/>
@@ -550,7 +554,7 @@ HELM: Now is: -->
         </xsl:for-each>
        </xsl:when>
        <xsl:otherwise>
-        <m:mrow m:xref="{$id}">
+        <m:mrow xref="{$id}">
          <xsl:copy-of select="*|text()"/>
         </m:mrow>
        </xsl:otherwise>
@@ -568,7 +572,7 @@ HELM: Now is: -->
     <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>
@@ -578,7 +582,7 @@ HELM: Now is: -->
     <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>
@@ -589,7 +593,7 @@ HELM: Now is: -->
     <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>
@@ -601,7 +605,7 @@ HELM: Now is: -->
       <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>
@@ -615,7 +619,7 @@ HELM: Now is: -->
         <xsl:variable name="id" select="@id"/>
         <xsl:for-each select="*[1]">
          <xsl:copy>
-          <xsl:attribute name="m:xref">
+          <xsl:attribute name="xref">
            <xsl:value-of select="$id"/>
           </xsl:attribute>
          <xsl:copy-of select="@*|*"/>
@@ -636,7 +640,7 @@ HELM: Now is: -->
 <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 -->
@@ -685,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>
@@ -693,7 +697,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:fn/@id"/>
           </xsl:attribute>
         </xsl:if>&#x02061;</m:mo>
@@ -712,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>
@@ -729,7 +733,7 @@ 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>
@@ -750,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>
@@ -760,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>
@@ -837,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>
@@ -861,7 +865,7 @@ 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>
@@ -887,7 +891,7 @@ 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>
@@ -902,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>
@@ -913,7 +917,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:compose/@id"/>
           </xsl:attribute>
         </xsl:if>&#x02218;</m:mo>
@@ -925,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>
@@ -939,7 +943,7 @@ 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>
@@ -947,7 +951,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:quotient/@id"/>
           </xsl:attribute>
         </xsl:if>
@@ -970,14 +974,14 @@ an mo. Mixed content: mrow which contains mo + presentation elements -->
 <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>
@@ -988,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>
@@ -999,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>
@@ -1009,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>
@@ -1019,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>
@@ -1028,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>
@@ -1099,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>
@@ -1122,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>
@@ -1144,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>
@@ -1164,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>
@@ -1187,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>
@@ -1210,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>
@@ -1252,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>
@@ -1280,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>
@@ -1304,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>
@@ -1327,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>
@@ -1355,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>
@@ -1364,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>
@@ -1389,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>
@@ -1412,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>
@@ -1443,7 +1447,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:times/@id"/>
           </xsl:attribute>
         </xsl:if>*</m:mo>
@@ -1459,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>
@@ -1483,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>
@@ -1491,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>
@@ -1501,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>
@@ -1524,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>
@@ -1546,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>
@@ -1574,7 +1578,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:and/@id"/>
           </xsl:attribute>
         </xsl:if>&#x02227;</m:mo>
@@ -1594,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>
@@ -1616,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>
@@ -1644,7 +1648,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:or/@id"/>
           </xsl:attribute>
         </xsl:if>&#x02228;</m:mo>
@@ -1664,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>
@@ -1685,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>
@@ -1713,7 +1717,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:xor/@id"/>
           </xsl:attribute>
         </xsl:if>&#x022BB;</m:mo>
@@ -1728,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>
@@ -1736,7 +1740,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:not/@id"/>
           </xsl:attribute>
         </xsl:if>&#x000AC;</m:mo>
@@ -1749,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>
@@ -1783,14 +1787,14 @@ 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>&#x02203;</m:mo>
@@ -1820,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>
@@ -1831,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>
@@ -1845,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>
@@ -1855,7 +1859,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:conjugate/@id"/>
           </xsl:attribute>
         </xsl:if>&#x00332;</m:mo>
@@ -1865,7 +1869,7 @@ an mo. Mixed content: mrow which contains mo + presentation elements -->
 <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>
@@ -1873,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>
@@ -1882,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>
@@ -1891,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>
@@ -1913,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>
@@ -1925,7 +1929,7 @@ 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>
@@ -1934,7 +1938,7 @@ an mo. Mixed content: mrow which contains mo + presentation elements -->
         <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>
@@ -1943,7 +1947,7 @@ an mo. Mixed content: mrow which contains mo + presentation elements -->
         <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>
@@ -1952,7 +1956,7 @@ an mo. Mixed content: mrow which contains mo + presentation elements -->
         <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>
@@ -1961,7 +1965,7 @@ an mo. Mixed content: mrow which contains mo + presentation elements -->
         <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>
@@ -1970,7 +1974,7 @@ an mo. Mixed content: mrow which contains mo + presentation elements -->
         <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>
@@ -1979,7 +1983,7 @@ an mo. Mixed content: mrow which contains mo + presentation elements -->
         <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>
@@ -1988,7 +1992,7 @@ an mo. Mixed content: mrow which contains mo + presentation elements -->
         <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>
@@ -2000,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>
@@ -2009,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>
@@ -2023,7 +2027,7 @@ 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>
@@ -2032,7 +2036,7 @@ an mo. Mixed content: mrow which contains mo + presentation elements -->
           <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>
@@ -2041,7 +2045,7 @@ an mo. Mixed content: mrow which contains mo + presentation elements -->
           <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>
@@ -2050,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>
@@ -2059,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>
@@ -2068,7 +2072,7 @@ 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>
@@ -2077,7 +2081,7 @@ an mo. Mixed content: mrow which contains mo + presentation elements -->
           <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>
@@ -2086,7 +2090,7 @@ an mo. Mixed content: mrow which contains mo + presentation elements -->
           <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>
@@ -2105,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>
@@ -2115,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>
@@ -2126,7 +2130,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>
@@ -2142,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>
@@ -2153,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>
@@ -2165,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>
@@ -2183,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>
@@ -2209,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>
@@ -2217,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>
@@ -2238,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>
@@ -2256,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>
@@ -2265,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>
@@ -2286,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>
@@ -2310,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>
@@ -2318,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>
@@ -2327,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>
@@ -2336,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>
@@ -2359,14 +2363,14 @@ 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>
@@ -2383,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>
@@ -2421,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>
@@ -2444,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>
@@ -2472,7 +2476,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:union/@id"/>
           </xsl:attribute>
         </xsl:if>&#x022C3;</m:mo>
@@ -2493,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>
@@ -2516,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>
@@ -2544,7 +2548,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:intersect/@id"/>
           </xsl:attribute>
         </xsl:if>&#x022C2;</m:mo>
@@ -2566,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>
@@ -2589,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>
@@ -2616,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>
@@ -2631,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>
@@ -2647,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>
@@ -2658,7 +2662,7 @@ 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>
@@ -2667,7 +2671,7 @@ an mo. Mixed content: mrow which contains mo + presentation elements -->
             <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>
@@ -2689,7 +2693,7 @@ 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>
@@ -2698,7 +2702,7 @@ an mo. Mixed content: mrow which contains mo + presentation elements -->
             <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>
@@ -2716,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>
@@ -2724,7 +2728,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:lim/@id"/>
           </xsl:attribute>
         </xsl:if>lim</m:mo>
@@ -2754,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>
@@ -2778,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>
@@ -2838,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>
@@ -2851,14 +2855,14 @@ 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>&#x003C3;</m:mo>
@@ -2873,14 +2877,14 @@ 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>&#x003C3;</m:mo>
@@ -2898,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>
@@ -2920,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>
@@ -2942,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>
@@ -2966,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>
@@ -2983,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>
@@ -2996,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>
@@ -3011,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>
@@ -3029,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>
@@ -3037,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>
@@ -3067,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>
@@ -3076,7 +3080,7 @@ 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>
@@ -3085,7 +3089,7 @@ an mo. Mixed content: mrow which contains mo + presentation elements -->
       <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>