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/16 13:40:12 UTC
svn commit: r1805193 - in /httpd/httpd/trunk/docs/manual/style/xsl:
common.xsl synopsis.xsl
Author: elukey
Date: Wed Aug 16 13:40:12 2017
New Revision: 1805193
URL: http://svn.apache.org/viewvc?rev=1805193&view=rev
Log:
common|synopsis.xsl: rename directive type=sections id generation
This commits is a follow up of r1805189 and it is meant
to allow directives with the same name but different type
to coexist in the same document without triggering errors
while executing validate-xhtml.
For example: mod_md.xml recently introduced the following:
* ManagedDomain
* <ManagedDomain> (this one is type=section)
In my opinion this is a perfectly valid use case and it should
be allowed/handled correctly by the doc generation process/validation.
In order to avoid clashing the directive ids will get a suffix
called "section" if type=section will be present as param.
Quicklinks, <directive> links have been updated to the new
scheme to avoid dandling pointers in the doc.
Comments/reviews are welcome, if I left something behind
please let me know.
Modified:
httpd/httpd/trunk/docs/manual/style/xsl/common.xsl
httpd/httpd/trunk/docs/manual/style/xsl/synopsis.xsl
Modified: httpd/httpd/trunk/docs/manual/style/xsl/common.xsl
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/docs/manual/style/xsl/common.xsl?rev=1805193&r1=1805192&r2=1805193&view=diff
==============================================================================
--- httpd/httpd/trunk/docs/manual/style/xsl/common.xsl (original)
+++ httpd/httpd/trunk/docs/manual/style/xsl/common.xsl Wed Aug 16 13:40:12 2017
@@ -887,12 +887,12 @@ if (typeof(prettyPrint) !== 'undefined')
<xsl:variable name="lowerdirective">
<xsl:choose>
<xsl:when test="@name">
- <xsl:value-of select="normalize-space(translate(@name,
- $uppercase, $lowercase))" />
+ <xsl:value-of select="normalize-space(concat(translate(@name,
+ $uppercase, $lowercase),@type))" />
</xsl:when>
<xsl:otherwise>
- <xsl:value-of select="normalize-space(translate(.,
- $uppercase, $lowercase))" />
+ <xsl:value-of select="normalize-space(concat(translate(.,
+ $uppercase, $lowercase),@type))" />
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
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=1805193&r1=1805192&r2=1805193&view=diff
==============================================================================
--- httpd/httpd/trunk/docs/manual/style/xsl/synopsis.xsl (original)
+++ httpd/httpd/trunk/docs/manual/style/xsl/synopsis.xsl Wed Aug 16 13:40:12 2017
@@ -194,8 +194,8 @@
/modulesynopsis/directivesynopsis">
<xsl:sort select="name" />
<xsl:variable name="lowername"
- select="translate(name, $uppercase,
- $lowercase)" />
+ select="concat(translate(name, $uppercase,
+ $lowercase),@type)" />
<xsl:choose>
<xsl:when test="not(@location)">
@@ -353,9 +353,12 @@
<xsl:call-template name="toplink" />&lf;
<div class="directive-section">
+ <!-- Concatenate the Directive name with its type to allow
+ a directive to be referenced multiple times
+ with different types -->
<xsl:variable name="lowername"
- select="translate(name, $uppercase, $lowercase)" />
-
+ select="concat(translate(name, $uppercase, $lowercase),@type)" />
+ <xsl:variable name="directivename" select="concat(name,@type)" />
<!-- Directive heading gets both mixed case and lowercase -->
<!-- anchors, and includes lt/gt only for "section" directives -->
<h2>
@@ -377,7 +380,7 @@
</xsl:otherwise>
</xsl:choose>
- <a id="{name}" name="{name}">
+ <a id="{$directivename}" name="{$directivename}">
<xsl:if test="@type='section'"><</xsl:if>
<xsl:value-of select="name" />
<xsl:if test="@type='section'">></xsl:if>
@@ -385,7 +388,7 @@
</xsl:when>
<xsl:otherwise>
- <a id="{name}" name="{name}">
+ <a id="{$directivename}" name="{$directivename}">
<xsl:if test="@type='section'"><</xsl:if>
<xsl:value-of select="name" />
<xsl:if test="@type='section'">></xsl:if>