Commit 8f68408c authored by Luca Toscano's avatar Luca Toscano
Browse files

doc xsl/dtd: introduce idtype attribute for directivesynopsis

In r1805193 synopsis.xsl was changed to allow two directives
of different type (like <SSLPolicy> and SSLPolicy) to share
the same name but have different ids (and please validate-xml/xhtml).
The downside of this action was that all the quicklinks to
existing directive sections (like <If>, <VirtualHost>, etc..)
were changed, possibly breaking external clients already
referencing them.

This change introduces a new attribute in the directivesynopsis
DTD, namely 'idtype', that will be appended to 'name'
in the id generation by synopsis.xsl. This will rollback
link names to their previous values and will allow documentators
to fine tune directivesynopsis sections as they need
(for example we have recently introduced mod_md's
ManagedDomain/<ManagedDomain>, and modssl's SSLPolicy/<SSLPolicy>).

This approach seems more precise and less invasive to me.
Of course the name of the attribute can be changed later on
to whatever term would fit best, the main concern for me at
the moment is to restore the trunk documentation to its previous
state.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1805372 13f79535-47bb-0310-9956-ffa450edef68
parent 95f22197
Loading
Loading
Loading
Loading
+9 −2
Original line number Diff line number Diff line
@@ -45,7 +45,14 @@ usage?, seealso*)>

<!ELEMENT description %Inline;>

<!-- 
 idtype is appended to the directive name when generating links to allow
 a directive of type section to share the name with another directive.
 The attribute type could have been (re)used instead but it would have broken
 pre-existing links.
-->
<!ATTLIST directivesynopsis  type       CDATA  #IMPLIED
                             idtype     CDATA  #IMPLIED
                             location   CDATA  #IMPLIED >

<!ELEMENT syntax %Inline;>
+2 −2
Original line number Diff line number Diff line
@@ -888,11 +888,11 @@ if (typeof(prettyPrint) !== 'undefined') {
            <xsl:choose>
            <xsl:when test="@name">
                <xsl:value-of select="normalize-space(concat(translate(@name,
                                        $uppercase, $lowercase),@type))" />
                                        $uppercase, $lowercase),@idtype))" />
            </xsl:when>
            <xsl:otherwise>
                <xsl:value-of select="normalize-space(concat(translate(.,
                                        $uppercase, $lowercase),@type))" />
                                        $uppercase, $lowercase),@idtype))" />
            </xsl:otherwise>
            </xsl:choose>
        </xsl:variable>
+3 −3
Original line number Diff line number Diff line
@@ -195,7 +195,7 @@
                            <xsl:sort select="name" />
                                <xsl:variable name="lowername"
                                    select="concat(translate(name, $uppercase,
                                                   $lowercase),@type)" />
                                                   $lowercase),@idtype)" />

                                <xsl:choose>
                                <xsl:when test="not(@location)">
@@ -357,8 +357,8 @@
             a directive to be referenced multiple times
             with different types -->
        <xsl:variable name="lowername"
            select="concat(translate(name, $uppercase, $lowercase),@type)" />
        <xsl:variable name="directivename" select="concat(name,@type)" />
            select="concat(translate(name, $uppercase, $lowercase),@idtype)" />
        <xsl:variable name="directivename" select="concat(name,@idtype)" />
        <!-- Directive heading gets both mixed case and lowercase      -->
        <!-- anchors, and includes lt/gt only for "section" directives -->
        <h2>