[yelp-xsl] mal2html-links: Use apply page styles to links for topics



commit 52dbd8899962cf7e1d572647dbb4197dce5c2c3b
Author: Shaun McCance <shaunm gnome org>
Date:   Tue Mar 13 09:00:39 2012 -0400

    mal2html-links: Use apply page styles to links for topics

 xslt/mallard/html/mal2html-links.xsl |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/xslt/mallard/html/mal2html-links.xsl b/xslt/mallard/html/mal2html-links.xsl
index 5753f5d..343299e 100644
--- a/xslt/mallard/html/mal2html-links.xsl
+++ b/xslt/mallard/html/mal2html-links.xsl
@@ -71,7 +71,9 @@ parameter will be used if provided.
   <xsl:param name="role" select="''"/>
   <xsl:param name="divs" select="false()"/>
   <xsl:param name="title" select="''"/>
-  <xsl:variable name="style" select="concat(' ', $node/@style, ' ')"/>
+  <!-- We use the style attribute on page for links styles for backwards
+       compatibility, but only for topic links. -->
+  <xsl:variable name="style" select="concat(' ', $node[self::mal:links or $role = 'topic']/@style, ' ')"/>
   <xsl:variable name="nodesc" select="contains($style, ' nodesc ')"/>
   <xsl:variable name="maltitle" select="$node/self::mal:links/mal:title"/>
   <xsl:variable name="expander" select="($maltitle or ($title != '')) and $node/self::mal:links/@ui:expanded"/>



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