]> granicus.if.org Git - docbook-dsssl/commitdiff
Restored templates for mml:* elements that were accidentally deleted.
authorBob Stayton <bobs@sagehill.net>
Thu, 24 May 2012 16:33:32 +0000 (16:33 +0000)
committerBob Stayton <bobs@sagehill.net>
Thu, 24 May 2012 16:33:32 +0000 (16:33 +0000)
xsl/fo/math.xsl

index cb7e40e5bc604c1901eab549db358f27ef81109c..d7f66a69589e8498ec7e98f825eb46a81682a84c 100644 (file)
   </fo:inline>
 </xsl:template>
 
+<!-- "Support" for MathML -->
+
+<xsl:template match="mml:math" xmlns:mml="http://www.w3.org/1998/Math/MathML">
+  <xsl:choose>
+    <!-- * If user is using passivetex, we don't wrap the output in -->
+    <!-- * fo:instream-foreign-object (which passivetex doesn't support). -->
+    <xsl:when test="not($passivetex.extensions = 0)">
+      <xsl:copy>
+        <xsl:copy-of select="@*"/>
+        <xsl:apply-templates/>
+      </xsl:copy>
+    </xsl:when>
+    <xsl:otherwise>
+      <fo:instream-foreign-object>
+        <xsl:copy>
+          <xsl:copy-of select="@*"/>
+          <xsl:apply-templates/>
+        </xsl:copy>
+      </fo:instream-foreign-object>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<xsl:template match="mml:*" xmlns:mml="http://www.w3.org/1998/Math/MathML">
+  <xsl:copy>
+    <xsl:copy-of select="@*"/>
+    <xsl:apply-templates/>
+  </xsl:copy>
+</xsl:template>
+
 <xsl:template match="equation/graphic | informalequation/graphic">
   <xsl:if test="$tex.math.in.alt = ''">
     <fo:block>