]> granicus.if.org Git - apache/commitdiff
Quireference extract the default value of a directive from the <default> of the...
authorChristophe Jaillet <jailletc36@apache.org>
Sun, 27 Jan 2019 13:49:29 +0000 (13:49 +0000)
committerChristophe Jaillet <jailletc36@apache.org>
Sun, 27 Jan 2019 13:49:29 +0000 (13:49 +0000)
The current implementation  expects <default> to be formated like:
directive_name default_value

If the directive name is not there, no default value can be extracted and it is missing in the quickreference table.

This commit adds a basic check to see if the formating looks correct. It catches cases where the directive name is  omited or is misspelled.

If it generates too much noise, feel free to revert or improve :)

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1852285 13f79535-47bb-0310-9956-ffa450edef68

docs/manual/style/xsl/quickreference.xsl

index 84cf20d502cd1f7691cebdb306586b9fd02bb08f..c6c9afc735b1d47898c0cbb13f6da7e5c928760e 100644 (file)
             </xsl:choose>
         </xsl:variable>
 
+        <!-- Check if the default string really starts with the directive -->
+        <!-- name, in order to avoid typo, or unexpected formatting.      -->
+        <!-- Below, we skip the directive name, so, for it to work, it    -->
+        <!-- must be there.                                               -->
+        <xsl:if test="string-length($default) &gt; 0
+                      and substring-before($default, ' ') != name">
+            <xsl:message>Spurious default string: <xsl:value-of select="$default"/> (Directive <xsl:value-of select="name"/> omitted or misspelled)</xsl:message>
+        </xsl:if>
+
         <!-- Now. If the default output is empty, the xslt processor emits -->
         <!-- <td />. In order to avoid this, we simply emit <td></td>      -->
         <!-- by ourselves. Crap.                                           -->