httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject svn commit: r1806443 - /httpd/httpd/trunk/docs/manual/style/xsl/synopsis.xsl
Date Mon, 28 Aug 2017 12:34:58 GMT
Author: elukey
Date: Mon Aug 28 12:34:58 2017
New Revision: 1806443

synopsis.xsl: fix broken translation builds

This commit is a follow up of r1805189, in which
a new logic was added to allow to repeat a directive
name only if its type is different (like SSLPolicy
and <SSLPolicy>). The change broken french translations
since the $this variable, containing the translated
sections, was not used anymore.

The XPath code could surely be improved, but it seems
more pressing to allow our translators to get back
to their daily work without interference. validate-* worked fine, as well as the fr


Modified: httpd/httpd/trunk/docs/manual/style/xsl/synopsis.xsl
--- httpd/httpd/trunk/docs/manual/style/xsl/synopsis.xsl (original)
+++ httpd/httpd/trunk/docs/manual/style/xsl/synopsis.xsl Mon Aug 28 12:34:58 2017
@@ -325,7 +325,22 @@
             <xsl:sort select="name" />
                 <xsl:when test="$this[name=current()/name]">
-                    <xsl:apply-templates select="." />
+                    <!-- A directive name is allowed to be repeated if its type
+                         is different. There is currently only one allowed type
+                         to set, namely 'section', that represents
+                         directive/containers like <DirectiveName>.
+                         The following check is needed to avoid rendering
+                         multiple times the same content when a directive name
+                         is repeated.
+                     -->
+                    <xsl:choose>
+                        <xsl:when test="current()[@type='section']">
+                            <xsl:apply-templates select="$this[name=current()/name and
@type='section']" />
+                        </xsl:when>
+                        <xsl:otherwise>
+                            <xsl:apply-templates select="$this[name=current()/name and
not(@type='section')]" />
+                        </xsl:otherwise>
+                    </xsl:choose>
                     <xsl:apply-templates select=".">

View raw message