summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShaun McCance <shaunm@redhat.com>2021-10-14 15:06:50 -0400
committerShaun McCance <shaunm@redhat.com>2021-10-14 15:06:50 -0400
commit9a03e634aeeda0011481616ae4a8e29d2b96aab4 (patch)
tree83d7ac2d6cc8d8336ea3426056bc9b9d69d56c47
parentf805ea24e24ef3471aaffe75b7e0e0b829d4592a (diff)
downloadyelp-xsl-9a03e634aeeda0011481616ae4a8e29d2b96aab4.tar.gz
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.
-rw-r--r--xslt/mallard/html/mal2html-page.xsl2
1 files changed, 1 insertions, 1 deletions
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'">