]> granicus.if.org Git - docbook-dsssl/commitdiff
Updated support for SVG (must be a child of imagedata in DB 5).
authorMauritz Jeanson <mj@johanneberg.com>
Tue, 14 Aug 2007 15:59:17 +0000 (15:59 +0000)
committerMauritz Jeanson <mj@johanneberg.com>
Tue, 14 Aug 2007 15:59:17 +0000 (15:59 +0000)
Added support for MathML in imagedata.

xsl/html/graphics.xsl

index bdf9c2048aff4710ed680da5f2eadfc7fa56953a..497e2fb9a96c7ef90dbec8355ebacf3aae38e2b1 100644 (file)
@@ -1138,15 +1138,7 @@ valign: <xsl:value-of select="@valign"/></xsl:message>
 </xsl:template>
 
 <xsl:template match="imageobject">
-  <xsl:choose>
-    <xsl:when xmlns:svg="http://www.w3.org/2000/svg"
-              test="svg:*">
-      <xsl:apply-templates/>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:apply-templates select="imagedata"/>
-    </xsl:otherwise>
-  </xsl:choose>
+  <xsl:apply-templates select="imagedata"/>
 </xsl:template>
 
 <xsl:template match="imagedata">
@@ -1157,6 +1149,15 @@ valign: <xsl:value-of select="@valign"/></xsl:message>
   </xsl:variable>
 
   <xsl:choose>
+    <!-- Handle MathML and SVG markup in imagedata -->
+    <xsl:when test="mml:*" xmlns:mml="http://www.w3.org/1998/Math/MathML">
+      <xsl:apply-templates/>
+    </xsl:when>
+    
+    <xsl:when test="svg:*" xmlns:svg="http://www.w3.org/2000/svg">
+      <xsl:apply-templates/>
+    </xsl:when>
+
     <xsl:when test="@format='linespecific'">
       <xsl:choose>
         <xsl:when test="$use.extensions != '0'