</m:mrow>
</m:mtd>
</m:mtr>
- <xsl:for-each select="*[position() mod 2 = 0 and position()>3]">
- <xsl:variable name="charlength"><xsl:apply-templates select="." mode="charcount"><xsl:with-param name="nosibling" select="1"/></xsl:apply-templates></xsl:variable>
+ <xsl:for-each select="piecewise/piece">
+ <xsl:variable name="charlength"><xsl:apply-templates select="./*[2]" mode="charcount"><xsl:with-param name="nosibling" select="1"/></xsl:apply-templates></xsl:variable>
<m:mtr>
<m:mtd>
<m:mrow>
</xsl:otherwise>
</xsl:choose>
<m:mphantom><m:mtext>_</m:mtext></m:mphantom>
- <xsl:apply-templates select="."/>
+ <xsl:apply-templates select="./*[2]"/>
<xsl:if test="$framewidth > $charlength">
<m:mo mathcolor="Green">⇒</m:mo>
- <xsl:apply-templates select="following-sibling::*[position()= 1]"/>
+ <xsl:apply-templates select="./*[1]"/>
</xsl:if>
</m:mrow>
</m:mtd>
<m:mrow>
<m:mphantom><m:mtext>|_</m:mtext></m:mphantom>
<m:mo mathcolor="Green">⇒</m:mo>
- <xsl:apply-templates select="following-sibling::*[position()= 1]"/>
+ <xsl:apply-templates select="./*[1]"/>
</m:mrow>
</m:mtd>
</m:mtr>
<xsl:apply-templates select="*[position()=3]"/>
<m:mphantom><m:mtext>_</m:mtext></m:mphantom>
<m:mo>OF</m:mo>
- <xsl:for-each select="*[position() mod 2 = 0 and position()>3]">
+ <xsl:for-each select="piecewise/piece">
<xsl:choose>
<xsl:when test="position() != 1">
<m:mo stretchy="false">|</m:mo>
</xsl:when>
</xsl:choose>
- <xsl:apply-templates select="."/>
+ <xsl:apply-templates select="./*[2]"/>
<m:mo mathcolor="Green">⇒</m:mo>
- <xsl:apply-templates select="following-sibling::*[position()= 1]"/>
+ <xsl:apply-templates select="./*[1]"/>
</xsl:for-each>
<m:mphantom><m:mtext>_</m:mtext></m:mphantom>
<m:mo>END</m:mo>