<!-- 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:mrow>
</xsl:if>
<xsl:if test="not(*[2])">
+<!--HELM: Was:
<xsl:apply-templates select="*[1]"/>
+HELM: Now is: -->
+ <xsl:variable name="id" select="@id"/>
+ <xsl:for-each select="*[1]">
+ <xsl:copy>
+ <xsl:attribute name="m:xref">
+ <xsl:value-of select="$id"/>
+ </xsl:attribute>
+ <xsl:copy-of select="@*|*"/>
+ </xsl:copy>
+ </xsl:for-each>
+<!-- HELM -->
</xsl:if>
</xsl:otherwise>
</xsl:choose>
-<!-- HELM: added -->
-</xsl:when>
- <xsl:otherwise>
- <m:mrow>
- <xsl:copy-of select="*"/>
- <xsl:attribute name="m:xref">
- <xsl:value-of select="@id"/>
- </xsl:attribute>
- </m:mrow>
- </xsl:otherwise>
- </xsl:choose>
<!-- HELM -->
</xsl:template>