[yelp-xsl] mal2html-page: Fix topic links from guide pages in stacks



commit 9a03e634aeeda0011481616ae4a8e29d2b96aab4
Author: Shaun McCance <shaunm redhat com>
Date:   Thu Oct 14 15:06:50 2021 -0400

    mal2html-page: Fix topic links from guide pages in stacks
    
    We were looking for the type as an attr on the root page element,
    which isn't what we have in a stack.
    
    This still doesn't address a stack type that is an implicit first
    guide and further topics, but that requires deeper surgery.

 xslt/mallard/html/mal2html-page.xsl | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/xslt/mallard/html/mal2html-page.xsl b/xslt/mallard/html/mal2html-page.xsl
index 5812fb8b..4faf6d36 100644
--- a/xslt/mallard/html/mal2html-page.xsl
+++ b/xslt/mallard/html/mal2html-page.xsl
@@ -778,7 +778,7 @@ templates that handle `page` and `section` elements.
 
 <!-- page | section -->
 <xsl:template match="mal:page | mal:section">
-  <xsl:variable name="type" select="/mal:page/@type"/>
+  <xsl:variable name="type" select="ancestor-or-self::mal:page[1]/@type"/>
   <xsl:variable name="depth" select="count(ancestor-or-self::mal:section) + 1"/>
   <xsl:variable name="topiclinks">
     <xsl:if test="$type = 'guide'">


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