[yelp-xsl] mal2html-block: Allow raw block to function as if:else



commit a3e505c7712736d04c69d1df8045f7eaf007dd1b
Author: Shaun McCance <shaunm gnome org>
Date:   Mon May 2 08:32:27 2011 -0400

    mal2html-block: Allow raw block to function as if:else

 xslt/mallard/html/mal2html-block.xsl |   11 ++++++++++-
 1 files changed, 10 insertions(+), 1 deletions(-)
---
diff --git a/xslt/mallard/html/mal2html-block.xsl b/xslt/mallard/html/mal2html-block.xsl
index fa6bf3c..334c618 100644
--- a/xslt/mallard/html/mal2html-block.xsl
+++ b/xslt/mallard/html/mal2html-block.xsl
@@ -467,7 +467,16 @@ in accordance with the Mallard specification on fallback block content.
       <xsl:apply-templates mode="mal2html.block.mode" select="if:when[position() = number($pos)]/*"/>
     </xsl:when>
     <xsl:otherwise>
-      <xsl:apply-templates mode="mal2html.block.mode" select="if:else/*"/>
+      <xsl:for-each select="if:when[last()]/following-sibling::*">
+        <xsl:choose>
+          <xsl:when test="self::if:else">
+            <xsl:apply-templates mode="mal2html.block.mode" select="*"/>
+          </xsl:when>
+          <xsl:otherwise>
+            <xsl:apply-templates mode="mal2html.block.mode" select="."/>
+          </xsl:otherwise>
+        </xsl:choose>
+      </xsl:for-each>
     </xsl:otherwise>
   </xsl:choose>
 </xsl:template>



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