]> granicus.if.org Git - apache/commitdiff
doc xsl/dtd: introduce idtype attribute for directivesynopsis
authorLuca Toscano <elukey@apache.org>
Fri, 18 Aug 2017 08:21:43 +0000 (08:21 +0000)
committerLuca Toscano <elukey@apache.org>
Fri, 18 Aug 2017 08:21:43 +0000 (08:21 +0000)
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

docs/manual/style/modulesynopsis.dtd
docs/manual/style/xsl/common.xsl
docs/manual/style/xsl/synopsis.xsl

index 1ca9b06542bfa4d5b9d0ed4b40df84bfa1ff4ac3..aa3d6ee9d5eba6cd366b96633255b3e4672cbc0c 100644 (file)
@@ -45,8 +45,15 @@ usage?, seealso*)>
 
 <!ELEMENT description %Inline;>
 
-<!ATTLIST directivesynopsis  type CDATA  #IMPLIED
-                             location CDATA  #IMPLIED >
+<!-- 
+ 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;>
 
index e0e21bf77f152ad1aad64a43a2464e424cfa99af..e9d8ffef83a3f636e7b4bcddfe7046800d44bd1d 100644 (file)
@@ -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>
index 00fb6fb79260a19ce007e0cc10180a277e5fbe14..37aa3c27d1dd6d05a4957923c3f1e126a9af95b8 100644 (file)
                             <xsl:sort select="name" />
                                 <xsl:variable name="lowername"
                                     select="concat(translate(name, $uppercase,
-                                                   $lowercase),@type)" />
+                                                   $lowercase),@idtype)" />
 
                                 <xsl:choose>
                                 <xsl:when test="not(@location)">
              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>