]> granicus.if.org Git - apache/commitdiff
evaluate the new dtd attributes.
authorAndré Malo <nd@apache.org>
Sun, 26 Jan 2014 22:55:00 +0000 (22:55 +0000)
committerAndré Malo <nd@apache.org>
Sun, 26 Jan 2014 22:55:00 +0000 (22:55 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1561567 13f79535-47bb-0310-9956-ffa450edef68

docs/manual/style/latex/common.xsl
docs/manual/style/xsl/common.xsl

index 6d9470d35458e79a209b901aaac6be079e603390..228204176fdfc8bd49349535a0c762145bf69e4b 100644 (file)
@@ -142,29 +142,51 @@ select="$metafile/basename"/>
 <!-- ==================================================================== -->
 <xsl:template match="directive" name="directive">
 <xsl:text>\textsc{</xsl:text>
-   <xsl:if test="@type='section'"><xsl:text>\textless{}</xsl:text></xsl:if>
-   <xsl:text>\hyperlink{/mod/</xsl:text>
-   <xsl:value-of select="@module"/>
-   <xsl:text>:</xsl:text>
-   <xsl:value-of select="translate(.,$uppercase,$lowercase)"/>
-   <xsl:text>}{</xsl:text>
-        <xsl:apply-templates/>
-   <xsl:text>}</xsl:text>
-   <xsl:if test="@type='section'"><xsl:text>\textgreater{}</xsl:text></xsl:if>
+<xsl:if test="@type='section'"><xsl:text>\textless{}</xsl:text></xsl:if>
+<xsl:if test="@module">
+  <xsl:text>\hyperlink{/mod/</xsl:text>
+  <xsl:value-of select="normalize-space(@module)"/>
+  <xsl:text>:</xsl:text>
+  <xsl:choose>
+  <xsl:when test="@name">
+    <xsl:value-of
+        select="normalize-space(translate(@name,$uppercase,$lowercase))"/>
+  </xsl:when>
+  <xsl:otherwise>
+    <xsl:value-of
+        select="normalize-space(translate(.,$uppercase,$lowercase))"/>
+  </xsl:otherwise>
+  </xsl:choose>
+  <xsl:text>}{</xsl:text>
+  <xsl:apply-templates/>
+  <xsl:text>}</xsl:text>
+</xsl:if>
+<xsl:if test="@type='section'"><xsl:text>\textgreater{}</xsl:text></xsl:if>
 <xsl:text>}</xsl:text>
 </xsl:template>
 
 <xsl:template match="directive" mode="tabular">
 <xsl:text>\textsc{</xsl:text>
-   <xsl:if test="@type='section'"><xsl:text>\textless{}</xsl:text></xsl:if>
-   <xsl:text>\hyperlink{/mod/</xsl:text>
-   <xsl:value-of select="@module"/>
-   <xsl:text>:</xsl:text>
-   <xsl:value-of select="translate(.,$uppercase,$lowercase)"/>
-   <xsl:text>}{</xsl:text>
-        <xsl:apply-templates mode="tabular"/>
-   <xsl:text>}</xsl:text>
-   <xsl:if test="@type='section'"><xsl:text>\textgreater{}</xsl:text></xsl:if>
+<xsl:if test="@type='section'"><xsl:text>\textless{}</xsl:text></xsl:if>
+<xsl:if test="@module">
+  <xsl:text>\hyperlink{/mod/</xsl:text>
+  <xsl:value-of select="normalize-space(@module)"/>
+  <xsl:text>:</xsl:text>
+  <xsl:choose>
+  <xsl:when test="@name">
+    <xsl:value-of
+        select="normalize-space(translate(@name,$uppercase,$lowercase))"/>
+  </xsl:when>
+  <xsl:otherwise>
+    <xsl:value-of
+        select="normalize-space(translate(.,$uppercase,$lowercase))"/>
+  </xsl:otherwise>
+  </xsl:choose>
+  <xsl:text>}{</xsl:text>
+  <xsl:apply-templates mode="tabular"/>
+  <xsl:text>}</xsl:text>
+</xsl:if>
+<xsl:if test="@type='section'"><xsl:text>\textgreater{}</xsl:text></xsl:if>
 <xsl:text>}</xsl:text>
 </xsl:template>
 
@@ -175,21 +197,39 @@ select="$metafile/basename"/>
 <!-- Inserts a link to refereed module                                    -->
 <!-- ==================================================================== -->
 <xsl:template match="module" name="module">
-<xsl:text>\textsc{\hyperlink{/mod/</xsl:text>
-  <xsl:value-of select="."/>
-  <xsl:text>}{</xsl:text>
+<xsl:choose>
+<xsl:when test="@outdated = 'true'">
+  <xsl:text>\textsc{</xsl:text>
     <xsl:apply-templates/>
   <xsl:text>}</xsl:text>
-<xsl:text>}</xsl:text>
+</xsl:when>
+<xsl:otherwise>
+  <xsl:text>\textsc{\hyperlink{/mod/</xsl:text>
+    <xsl:value-of select="normalize-space(.)"/>
+    <xsl:text>}{</xsl:text>
+      <xsl:apply-templates/>
+    <xsl:text>}</xsl:text>
+  <xsl:text>}</xsl:text>
+</xsl:otherwise>
+</xsl:choose>
 </xsl:template>
 
 <xsl:template match="module" mode="tabular">
-<xsl:text>\textsc{\hyperlink{/mod/</xsl:text>
-  <xsl:value-of select="."/>
-  <xsl:text>}{</xsl:text>
+<xsl:choose>
+<xsl:when test="@outdated = 'true'">
+  <xsl:text>\textsc{</xsl:text>
     <xsl:apply-templates mode="tabular"/>
   <xsl:text>}</xsl:text>
-<xsl:text>}</xsl:text>
+</xsl:when>
+<xsl:otherwise>
+  <xsl:text>\textsc{\hyperlink{/mod/</xsl:text>
+    <xsl:value-of select="normalize-space(.)"/>
+    <xsl:text>}{</xsl:text>
+      <xsl:apply-templates/>
+    <xsl:text>}</xsl:text>
+  <xsl:text>}</xsl:text>
+</xsl:otherwise>
+</xsl:choose>
 </xsl:template>
 <!-- /module -->
 
index c541ebe3015c53adac832b3ccdd3695c25bc909f..c6d25a56e5ff34d889ddd7c11a7eb8fa4d9b57eb 100644 (file)
@@ -712,8 +712,18 @@ if (typeof(prettyPrint) !== 'undefined') {
 <code class="directive">
     <xsl:choose>
     <xsl:when test="@module">
-        <xsl:variable name="lowerdirective"
-            select="translate(., $uppercase, $lowercase)" />
+        <xsl:variable name="lowerdirective">
+            <xsl:choose>
+            <xsl:when test="@name">
+                <xsl:value-of select="normalize-space(translate(@name,
+                                        $uppercase, $lowercase))" />
+            </xsl:when>
+            <xsl:otherwise>
+                <xsl:value-of select="normalize-space(translate(.,
+                                        $uppercase, $lowercase))" />
+            </xsl:otherwise>
+            </xsl:choose>
+        </xsl:variable>
 
         <xsl:choose>
         <xsl:when test="$in-modulesynopsis and @module = /modulesynopsis/name">
@@ -750,9 +760,16 @@ if (typeof(prettyPrint) !== 'undefined') {
 <!-- ==================================================================== -->
 <xsl:template match="module" name="module">
 <code class="module">
-    <a href="{$path}/mod/{.}.html">
+    <xsl:choose>
+    <xsl:when test="@outdated = 'true'">
         <xsl:value-of select="."/>
-    </a>
+    </xsl:when>
+    <xsl:otherwise>
+        <a href="{$path}/mod/{.}.html">
+            <xsl:value-of select="."/>
+        </a>
+    </xsl:otherwise>
+    </xsl:choose>
 </code>
 </xsl:template>
 <!-- /module -->