diff options
author | Shaun McCance <shaunm@gnome.org> | 2009-05-03 12:27:16 -0500 |
---|---|---|
committer | Shaun McCance <shaunm@gnome.org> | 2009-05-03 12:27:16 -0500 |
commit | 55475c9a21567ae22b5c87de850b20796b6256a4 (patch) | |
tree | fc29c6763e8bef8ea4463842c9d8a1b01c57d185 /xslt | |
parent | fbb0711182c22a665d92e1842472fc341cfe4bda (diff) | |
download | gnome-doc-utils-55475c9a21567ae22b5c87de850b20796b6256a4.tar.gz |
[mallard] Flushing out media elements spec and implementation
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> |