You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by el...@apache.org on 2017/08/28 12:34:58 UTC

svn commit: r1806443 - /httpd/httpd/trunk/docs/manual/style/xsl/synopsis.xsl

Author: elukey
Date: Mon Aug 28 12:34:58 2017
New Revision: 1806443

URL: http://svn.apache.org/viewvc?rev=1806443&view=rev
Log:
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.

build.sh validate-* worked fine, as well as the build.sh fr
translation.


Modified:
    httpd/httpd/trunk/docs/manual/style/xsl/synopsis.xsl

Modified: httpd/httpd/trunk/docs/manual/style/xsl/synopsis.xsl
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/docs/manual/style/xsl/synopsis.xsl?rev=1806443&r1=1806442&r2=1806443&view=diff
==============================================================================
--- 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:choose>
                 <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:when>
                 <xsl:otherwise>
                     <xsl:apply-templates select=".">