commit:     4282d691001af8b08765a71f50ddb7e32a93f8a4
Author:     Ulrich Müller <ulm <AT> gentoo <DOT> org>
AuthorDate: Thu Nov 23 17:20:50 2023 +0000
Commit:     Ulrich Müller <ulm <AT> gentoo <DOT> org>
CommitDate: Thu Nov 23 17:20:50 2023 +0000
URL:        https://gitweb.gentoo.org/proj/devmanual.git/commit/?id=4282d691

devbook.xsl: Use same test for eclass pages everywhere

Drop relative_path_depth variable which is no longer used.

Signed-off-by: Ulrich Müller <ulm <AT> gentoo.org>

 devbook.xsl | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/devbook.xsl b/devbook.xsl
index b50ecc5..322e267 100644
--- a/devbook.xsl
+++ b/devbook.xsl
@@ -510,11 +510,10 @@
 </xsl:template>
 
 <xsl:template match="/">
-  <xsl:variable name="relative_path_depth"
-                select="string-length(/guide/@self) - 
string-length(translate(/guide/@self, '/' , ''))"/>
   <xsl:variable name="relative_path_depth_recursion">
     <xsl:call-template name="repeat-string">
-      <xsl:with-param name="count" select="$relative_path_depth"/>
+      <xsl:with-param name="count" select="string-length(/guide/@self)
+                                           - 
string-length(translate(/guide/@self, '/' , ''))"/>
       <xsl:with-param name="append">../</xsl:with-param>
     </xsl:call-template>
   </xsl:variable>
@@ -715,7 +714,8 @@
                 The text of this document is distributed under the
                 <xsl:choose>
                   <!-- Eclasses are GPL-2, so we need a different footer -->
-                  <xsl:when test="starts-with(/guide/@self, 
'eclass-reference/') and $relative_path_depth &gt;= 2">
+                  <xsl:when test="starts-with(/guide/@self, 
'eclass-reference/')
+                                  and substring-after(/guide/@self, '/') != 
''">
                     <a href="https://www.gnu.org/licenses/gpl-2.0.html";>GNU 
General Public License, version 2</a>.
                   </xsl:when>
                   <xsl:otherwise>

Reply via email to