Skip to content
Snippets Groups Projects
Commit ad2cc7b1 authored by Goik Martin's avatar Goik Martin
Browse files

Handling captions in mediaobjects

parent 7b334634
No related branches found
No related tags found
No related merge requests found
......@@ -131,10 +131,18 @@
-->
</span>
</xsl:template>
<xsl:template match="db:informaltable">
<table border="{@border}" style="border-collapse: collapse;">
<xsl:template match="db:informaltable|db:table">
<table border="{@border}" style="border-collapse: collapse;margin-left: auto; margin-right: auto;">
<xsl:for-each select="db:caption">
<caption style="font-style:italic;">
<xsl:apply-templates/>
</caption>
</xsl:for-each>
<xsl:for-each select="db:tr">
<tr>
<xsl:apply-templates/>
......@@ -154,7 +162,7 @@
</xsl:template>
<xsl:template match="db:th">
<td style="text-align: center; font-weight: bolder;" valign="top">
<td style="text-align: center; font-weight: bold;" valign="top">
<xsl:copy-of select="@colspan"/>
<xsl:copy-of select="@rowspan"/>
<xsl:apply-templates/>
......@@ -251,8 +259,8 @@
<xsl:with-param name="svgFilename" select="db:imageobject/db:imagedata/@fileref"/>
</xsl:call-template>
</xsl:variable>
<img>
<figure style="text-align: center;">
<img>
<xsl:attribute name="src">
<xsl:text>data:image/</xsl:text>
<xsl:variable name="filename" select="db:imageobject/db:imagedata/@fileref"/>
......@@ -271,7 +279,13 @@
<xsl:text>;base64,</xsl:text>
<xsl:value-of select="document($base64Filename)/data/text()"/>
</xsl:attribute>
</img>
</img>
<xsl:for-each select="db:caption">
<figcaption style="font-style:italic;">
<xsl:apply-templates/>
</figcaption>
</xsl:for-each>
</figure>
</xsl:template>
<!-- link mode -->
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment