[yelp-xsl] mal2html-block: Allow if:when as a standalone block



commit 4d195f52064371dff2a6ee18bb41eb9d2dc2bba9
Author: Shaun McCance <shaunm gnome org>
Date:   Mon May 2 08:35:26 2011 -0400

    mal2html-block: Allow if:when as a standalone block

 xslt/mallard/html/mal2html-block.xsl |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)
---
diff --git a/xslt/mallard/html/mal2html-block.xsl b/xslt/mallard/html/mal2html-block.xsl
index 334c618..1d944fb 100644
--- a/xslt/mallard/html/mal2html-block.xsl
+++ b/xslt/mallard/html/mal2html-block.xsl
@@ -481,4 +481,14 @@ in accordance with the Mallard specification on fallback block content.
   </xsl:choose>
 </xsl:template>
 
+<!-- = if:when = -->
+<xsl:template mode="mal2html.block.mode" match="if:when">
+  <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>
+</xsl:template>
+
 </xsl:stylesheet>



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]