[yelp-xsl] mal2html-page: Changed mal2html.section.mode to named template



commit 646b578349531422d4cac8838340bd1cee0c2cef
Author: Shaun McCance <shaunm gnome org>
Date:   Thu Jan 26 09:56:57 2012 -0500

    mal2html-page: Changed mal2html.section.mode to named template

 xslt/mallard/html/mal2html-page.xsl |   27 +++++++++++++++++++++------
 1 files changed, 21 insertions(+), 6 deletions(-)
---
diff --git a/xslt/mallard/html/mal2html-page.xsl b/xslt/mallard/html/mal2html-page.xsl
index f31a329..4a05b82 100644
--- a/xslt/mallard/html/mal2html-page.xsl
+++ b/xslt/mallard/html/mal2html-page.xsl
@@ -555,22 +555,35 @@ separators used between links.
   <div class="clear"/>
 </xsl:template>
 
-<!-- = section = -->
-<xsl:template mode="mal2html.section.mode" match="mal:section">
-  <div id="{ id}">
+
+<!--**==========================================================================
+mal2html.section
+Output HTML for a Mallard #{section} element.
+:Revision:version="3.4" date="2012-01-26" status="final"
+$node: The #{section} element.
+
+This template outputs HTML for a #{section} element. It it called by the
+templates that handle #{page} and #{section} elements.
+-->
+<xsl:template name="mal2html.section">
+  <xsl:param name="node" select="."/>
+  <div id="{$node/@id}">
     <xsl:attribute name="class">
       <xsl:text>sect</xsl:text>
       <xsl:if test="@ui:expanded">
         <xsl:text> ui-expander</xsl:text>
       </xsl:if>
     </xsl:attribute>
-    <xsl:call-template name="mal2html.ui.expander.data"/>
+    <xsl:call-template name="mal2html.ui.expander.data">
+      <xsl:with-param name="node" select="$node"/>
+    </xsl:call-template>
     <div class="inner">
-      <xsl:apply-templates select="."/>
+      <xsl:apply-templates select="$node"/>
     </div>
   </div>
 </xsl:template>
 
+
 <!-- page | section -->
 <xsl:template match="mal:page | mal:section">
   <xsl:variable name="type" select="/mal:page/@type"/>
@@ -663,7 +676,9 @@ separators used between links.
       <xsl:call-template name="mal2html.facets.links"/>
     </xsl:if>
   </div>
-  <xsl:apply-templates mode="mal2html.section.mode" select="mal:section"/>
+  <xsl:for-each select="mal:section">
+    <xsl:call-template name="mal2html.section"/>
+  </xsl:for-each>
   <xsl:variable name="postlinks" select="mal:section/following-sibling::mal:links"/>
   <xsl:if test="(not(mal:section) and (
                   ($guidenodes and not(mal:links[ type = 'guide']))



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