7.5 Logarithms
<xsl:template match="
msub [
normalize-space(child::*[1]) = ’log’
or
normalize-space(child::*[1]) = ’ln’
]" >
<xsl:copy>
<xsl:apply-templates select="@*" />
<xsl:apply-templates select="child::*[1]" />
<xsl:apply-templates select="child::*[2]"
mode="log" />
</xsl:copy>
</xsl:template>
-_-_-
<xsl:template match="*" mode="log" >
<xsl:copy>
<xsl:apply-templates select="@*" />
<xsl:choose>
<xsl:when test="parent::mrow[ @class = ’mrow-sub’ ]" >
<BREAK SIZE="small"/>
<xsl:apply-templates select="*" />
<BREAK SIZE="small"/>
<span title="speech-extra">
<xsl:text>of</xsl:text>
</span>
<BREAK SIZE="small"/>
</xsl:when>
<xsl:otherwise>
<xsl:apply-templates
select="*[ not(@title = ’speech-extra’) ]"
mode="log" />
</xsl:otherwise>
</xsl:choose>
</xsl:copy>
</xsl:template>
-_-_-
<msub>
<mrow class="mrow-base">
<mo class="MathClass-op">log<BREAK SIZE="small"/></mo>
</mrow>
<mrow class="mrow-sub">
<span class="begin-script" title="speech-extra">
...
</span>
<PROS PITCH="-10">
<mn>2</mn>
</PROS>
<span class="end-script" title="speech-extra">
...
</span>
</mrow>
</msub>
<mi>x</mi>