diff options
Diffstat (limited to 'xslt')
-rw-r--r-- | xslt/mallard/html/mal2html-media.xsl | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/xslt/mallard/html/mal2html-media.xsl b/xslt/mallard/html/mal2html-media.xsl index 10531d6..20308b5 100644 --- a/xslt/mallard/html/mal2html-media.xsl +++ b/xslt/mallard/html/mal2html-media.xsl @@ -30,7 +30,7 @@ REMARK: Describe this module <!-- == Matched Templates == --> -<!-- = mal2html.block.mode % media/image = --> +<!-- = mal2html.block.mode % media = --> <xsl:template mode="mal2html.block.mode" match="mal:media"> <xsl:param name="first_child" select="not(preceding-sibling::*)"/> <xsl:choose> @@ -73,4 +73,24 @@ REMARK: Describe this module </xsl:choose> </xsl:template> +<!-- = mal2html.inline.mode % media = --> +<xsl:template mode="mal2html.inline.mode" match="mal:media"> + <xsl:choose> + <xsl:when test="@type = 'image'"> + <span class="media media-image"> + <img src="{@src}"> + <xsl:copy-of select="@height"/> + <xsl:copy-of select="@width"/> + <xsl:attribute name="alt"> + <xsl:value-of select="."/> + </xsl:attribute> + </img> + </span> + </xsl:when> + <xsl:otherwise> + <xsl:apply-templates mode="db2html.inline.mode"/> + </xsl:otherwise> + </xsl:choose> +</xsl:template> + </xsl:stylesheet> |