You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by ja...@apache.org on 2019/10/26 19:19:03 UTC
svn commit: r1869016 - /httpd/httpd/trunk/docs/manual/style/xsl/common.xsl
Author: jailletc36
Date: Sat Oct 26 19:19:03 2019
New Revision: 1869016
URL: http://svn.apache.org/viewvc?rev=1869016&view=rev
Log:
Help doc writer to spot places where:
- a link to a directive from within its own <directivesynoptis> should be avoided
This link is now silently removed
- a link to a directive is missing
Try to give some context where to find this missing link
Modified:
httpd/httpd/trunk/docs/manual/style/xsl/common.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=1869016&r1=1869015&r2=1869016&view=diff
==============================================================================
--- httpd/httpd/trunk/docs/manual/style/xsl/common.xsl (original)
+++ httpd/httpd/trunk/docs/manual/style/xsl/common.xsl Sat Oct 26 19:19:03 2019
@@ -901,6 +901,13 @@ if (typeof(prettyPrint) !== 'undefined')
</xsl:variable>
<xsl:choose>
+ <!-- No link if within the block that describes the directive itself -->
+ <xsl:when test="$in-modulesynopsis and normalize-space(.) = ancestor::directivesynopsis/name">
+ <xsl:if test="@type='section'"><</xsl:if>
+ <xsl:value-of select="."/>
+ <xsl:if test="@type='section'">></xsl:if>
+ <xsl:message>Removing link to '<xsl:value-of select="."/>'</xsl:message>
+ </xsl:when>
<xsl:when test="$in-modulesynopsis and normalize-space(@module) = /modulesynopsis/name">
<a href="#{$lowerdirective}">
<xsl:if test="@type='section'"><</xsl:if>
@@ -922,6 +929,17 @@ if (typeof(prettyPrint) !== 'undefined')
<xsl:if test="@type='section'"><</xsl:if>
<xsl:value-of select="."/>
<xsl:if test="@type='section'">></xsl:if>
+ <!-- Missing module reference -->
+ <xsl:choose>
+ <!-- within another directive synopsis -->
+ <xsl:when test="normalize-space(.) != ancestor::directivesynopsis/name">
+ <xsl:message>link to '<xsl:value-of select="."/>' directive could be added in directive '<xsl:value-of select="ancestor::directivesynopsis/name"/>'</xsl:message>
+ </xsl:when>
+ <!-- somewhere else (try to find module name to give a hint) -->
+ <xsl:when test="not(ancestor::directivesynopsis/name)">
+ <xsl:message>link to '<xsl:value-of select="."/>' directive could be added in MODULE '<xsl:value-of select="/modulesynopsis/name"/>'</xsl:message>
+ </xsl:when>
+ </xsl:choose>
</xsl:otherwise>
</xsl:choose>
</code>