[yelp-xsl] mal-cache.xsl: Fix copying of page/section attributes



commit 526c65ac5fa865f47d73068abe7f536a135d423c
Author: Shaun McCance <shaunm gnome org>
Date:   Mon Nov 21 16:07:56 2011 -0500

    mal-cache.xsl: Fix copying of page/section attributes

 xslt/mallard/cache/mal-cache.xsl     |   17 ++++++-----------
 xslt/mallard/html/mal2html-links.xsl |    2 ++
 xslt/mallard/html/mal2html-page.xsl  |    1 +
 3 files changed, 9 insertions(+), 11 deletions(-)
---
diff --git a/xslt/mallard/cache/mal-cache.xsl b/xslt/mallard/cache/mal-cache.xsl
index 03fd4cb..9c8d166 100644
--- a/xslt/mallard/cache/mal-cache.xsl
+++ b/xslt/mallard/cache/mal-cache.xsl
@@ -105,15 +105,14 @@ mal.cache.info
 <!-- = mal:page = -->
 <xsl:template match="mal:page">
   <xsl:param name="node_in"/>
-  <page cache:href="{$node_in/@cache:href}">
+  <page>
+    <xsl:copy-of select="@*"/>
+    <xsl:attribute name="cache:href">
+      <xsl:value-of select="$node_in/@cache:href"/>
+    </xsl:attribute>
     <xsl:call-template name="mal.cache.id">
       <xsl:with-param name="node_in" select="$node_in"/>
     </xsl:call-template>
-    <xsl:for-each select="@*">
-      <xsl:if test="not(self::cache:href) and not(self::id)">
-        <xsl:copy-of select="."/>
-      </xsl:if>
-    </xsl:for-each>
     <xsl:call-template name="mal.cache.info">
       <xsl:with-param name="node_in" select="$node_in"/>
     </xsl:call-template>
@@ -127,14 +126,10 @@ mal.cache.info
 <xsl:template match="mal:section">
   <xsl:param name="node_in"/>
   <section>
+    <xsl:copy-of select="@*"/>
     <xsl:call-template name="mal.cache.id">
       <xsl:with-param name="node_in" select="$node_in"/>
     </xsl:call-template>
-    <xsl:for-each select="@*">
-      <xsl:if test="not(self::id)">
-        <xsl:copy-of select="."/>
-      </xsl:if>
-    </xsl:for-each>
     <xsl:call-template name="mal.cache.info">
       <xsl:with-param name="node_in" select="$node_in"/>
     </xsl:call-template>
diff --git a/xslt/mallard/html/mal2html-links.xsl b/xslt/mallard/html/mal2html-links.xsl
index 9e8e7ce..bda5fbd 100644
--- a/xslt/mallard/html/mal2html-links.xsl
+++ b/xslt/mallard/html/mal2html-links.xsl
@@ -840,6 +840,7 @@ when determining which links to output.
   <xsl:param name="attrs"/>
   <xsl:param name="role" select="''"/>
   <xsl:param name="nodesc" select="false()"/>
+  <div class="linkdiv">
   <a class="{concat($class, ' linkdiv')}">
     <xsl:attribute name="href">
       <xsl:call-template name="mal.link.target">
@@ -878,6 +879,7 @@ when determining which links to output.
       </span>
     </xsl:if>
   </a>
+  </div>
 </xsl:template>
 
 <xsl:template mode="_mal2html.links.divs.nolink.mode" match="*">
diff --git a/xslt/mallard/html/mal2html-page.xsl b/xslt/mallard/html/mal2html-page.xsl
index 993939f..41e5d00 100644
--- a/xslt/mallard/html/mal2html-page.xsl
+++ b/xslt/mallard/html/mal2html-page.xsl
@@ -905,6 +905,7 @@ div.links .desc a:hover {
   color: </xsl:text><xsl:value-of select="$color.link"/><xsl:text>;
 }
 a.bold { font-weight: bold; }
+div.linkdiv { margin: 0; padding: 0; }
 a.linkdiv {
   display: block;
   margin: 0;



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