[yelp-xsl] mal2html-block: Fix if:if for maybe values
- From: Shaun McCance <shaunm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [yelp-xsl] mal2html-block: Fix if:if for maybe values
- Date: Mon, 23 Apr 2012 13:33:23 +0000 (UTC)
commit 26056147bb22a8d7c705deb939adc256a70353e9
Author: Shaun McCance <shaunm gnome org>
Date: Mon Apr 23 09:33:08 2012 -0400
mal2html-block: Fix if:if for maybe values
xslt/mallard/html/mal2html-block.xsl | 13 +++++++++++--
1 files changed, 11 insertions(+), 2 deletions(-)
---
diff --git a/xslt/mallard/html/mal2html-block.xsl b/xslt/mallard/html/mal2html-block.xsl
index 4626899..95e3875 100644
--- a/xslt/mallard/html/mal2html-block.xsl
+++ b/xslt/mallard/html/mal2html-block.xsl
@@ -579,8 +579,17 @@ in accordance with the Mallard specification on fallback block content.
<xsl:variable name="if">
<xsl:call-template name="mal.if.test"/>
</xsl:variable>
- <xsl:if test="$if = 'true'">
- <xsl:apply-templates mode="mal2html.block.mode"/>
+ <xsl:if test="$if != ''">
+ <xsl:choose>
+ <xsl:when test="$if != 'true'">
+ <div class="if-if {$if}">
+ <xsl:apply-templates mode="mal2html.block.mode"/>
+ </div>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:apply-templates mode="mal2html.block.mode"/>
+ </xsl:otherwise>
+ </xsl:choose>
</xsl:if>
</xsl:template>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]