Commit ce8ff9b0 authored by Christophe Jaillet's avatar Christophe Jaillet
Browse files

Quireference extract the default value of a directive from the <default> of...

Quireference extract the default value of a directive  from the <default> of the corresponding <directivesynopsis> block.

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
parent bf0ba14b
Loading
Loading
Loading
Loading
+9 −0
Changes for docs/manual/style/xsl/quickreference.xsl: 9 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -319,6 +319,15 @@
            </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.                                           -->