diff options
author | Christophe Jaillet <jailletc36@apache.org> | 2019-10-26 21:19:03 +0200 |
---|---|---|
committer | Christophe Jaillet <jailletc36@apache.org> | 2019-10-26 21:19:03 +0200 |
commit | 402ea113bbd93eef00e66ba0caaef75df15cd0e8 (patch) | |
tree | 46ef91e34888dbc21c05c4b423e6a142cf23201d /docs/manual/style/xsl/common.xsl | |
parent | Fix directive name in <syntax> (diff) | |
download | apache2-402ea113bbd93eef00e66ba0caaef75df15cd0e8.tar.xz apache2-402ea113bbd93eef00e66ba0caaef75df15cd0e8.zip |
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
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1869016 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'docs/manual/style/xsl/common.xsl')
-rw-r--r-- | docs/manual/style/xsl/common.xsl | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/docs/manual/style/xsl/common.xsl b/docs/manual/style/xsl/common.xsl index d2fb28e588..b629ebee7d 100644 --- a/docs/manual/style/xsl/common.xsl +++ b/docs/manual/style/xsl/common.xsl @@ -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> |