You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by nd...@apache.org on 2014/01/29 12:24:41 UTC

svn commit: r1562412 - in /httpd/httpd/branches/2.4.x/docs/manual/style: build.properties common.dtd latex/common.xsl latex/directiveindex.xsl latex/html.xsl latex/latex.xsl latex/quickreference.xsl latex/synopsis.xsl xsl/common.xsl

Author: nd
Date: Wed Jan 29 11:24:40 2014
New Revision: 1562412

URL: http://svn.apache.org/r1562412
Log:
apply style updates from trunk.

Modified:
    httpd/httpd/branches/2.4.x/docs/manual/style/build.properties
    httpd/httpd/branches/2.4.x/docs/manual/style/common.dtd
    httpd/httpd/branches/2.4.x/docs/manual/style/latex/common.xsl
    httpd/httpd/branches/2.4.x/docs/manual/style/latex/directiveindex.xsl
    httpd/httpd/branches/2.4.x/docs/manual/style/latex/html.xsl
    httpd/httpd/branches/2.4.x/docs/manual/style/latex/latex.xsl
    httpd/httpd/branches/2.4.x/docs/manual/style/latex/quickreference.xsl
    httpd/httpd/branches/2.4.x/docs/manual/style/latex/synopsis.xsl
    httpd/httpd/branches/2.4.x/docs/manual/style/xsl/common.xsl

Modified: httpd/httpd/branches/2.4.x/docs/manual/style/build.properties
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/docs/manual/style/build.properties?rev=1562412&r1=1562411&r2=1562412&view=diff
==============================================================================
--- httpd/httpd/branches/2.4.x/docs/manual/style/build.properties (original)
+++ httpd/httpd/branches/2.4.x/docs/manual/style/build.properties Wed Jan 29 11:24:40 2014
@@ -1,7 +1,7 @@
 # This file contains version specific properties
 
 # No xml files yet or anymore
-noxml.fr = rewrite/rewrite_guide.html.fr rewrite/rewrite_guide_advanced.html.fr
+#noxml.fr = rewrite/rewrite_guide.html.fr rewrite/rewrite_guide_advanced.html.fr
 
 manpages.8 = \
     apachectl \

Modified: httpd/httpd/branches/2.4.x/docs/manual/style/common.dtd
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/docs/manual/style/common.dtd?rev=1562412&r1=1562411&r2=1562412&view=diff
==============================================================================
--- httpd/httpd/branches/2.4.x/docs/manual/style/common.dtd (original)
+++ httpd/httpd/branches/2.4.x/docs/manual/style/common.dtd Wed Jan 29 11:24:40 2014
@@ -74,12 +74,15 @@ highlight | blockquote">
 <!ELEMENT directivelist (directive)+>
 
 <!ELEMENT module (#PCDATA)>
-<!ATTLIST module status CDATA  #IMPLIED>
+<!ATTLIST module status   CDATA  #IMPLIED
+                 outdated (true) #IMPLIED>
 
 <!ELEMENT directive (#PCDATA)>
+<!-- name attribute is preferred over contents when generating links -->
 <!ATTLIST directive  module CDATA  #IMPLIED
                      type   CDATA  #IMPLIED
-                     status CDATA  #IMPLIED >
+                     status CDATA  #IMPLIED
+                     name   CDATA  #IMPLIED >
 
 <!ELEMENT program (#PCDATA)>
 

Modified: httpd/httpd/branches/2.4.x/docs/manual/style/latex/common.xsl
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/docs/manual/style/latex/common.xsl?rev=1562412&r1=1562411&r2=1562412&view=diff
==============================================================================
--- httpd/httpd/branches/2.4.x/docs/manual/style/latex/common.xsl (original)
+++ httpd/httpd/branches/2.4.x/docs/manual/style/latex/common.xsl Wed Jan 29 11:24:40 2014
@@ -78,14 +78,14 @@ select="$metafile/basename"/>
 <!-- verbatim inside of fbox doesn't work for some reason -->
 <xsl:template match="example">
 <xsl:text>\par\smallskip\begin{center}</xsl:text>
-<xsl:if test="not(pre)"><xsl:text>\fbox{</xsl:text></xsl:if>
+<xsl:if test="not(pre) and not(highlight)"><xsl:text>\fbox{</xsl:text></xsl:if>
 <xsl:text>\begin{minipage}{.8\textwidth}\begin{flushleft}</xsl:text>
 <xsl:apply-templates select="title" mode="print" />
 <xsl:text>{\ttfamily\small </xsl:text>
 <xsl:text>\noindent </xsl:text><xsl:apply-templates/>
 <xsl:text>}</xsl:text>
 <xsl:text>\end{flushleft}\end{minipage}</xsl:text>
-<xsl:if test="not(pre)"><xsl:text>}</xsl:text></xsl:if>
+<xsl:if test="not(pre) and not(highlight)"><xsl:text>}</xsl:text></xsl:if>
 <xsl:text>\end{center}\par\smallskip</xsl:text>
 </xsl:template>
 
@@ -142,17 +142,64 @@ 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:choose>
+<xsl:when 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:when>
+<xsl:otherwise>
+  <xsl:apply-templates/>
+</xsl:otherwise>
+</xsl:choose>
+<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:choose>
+<xsl:when 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:when>
+<xsl:otherwise>
+  <xsl:apply-templates mode="tabular"/>
+</xsl:otherwise>
+</xsl:choose>
+<xsl:if test="@type='section'"><xsl:text>\textgreater{}</xsl:text></xsl:if>
 <xsl:text>}</xsl:text>
 </xsl:template>
+
 <!-- /directive -->
 
 <!-- ==================================================================== -->
@@ -160,12 +207,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:choose>
+<xsl:when test="@outdated = 'true'">
+  <xsl:text>\textsc{</xsl:text>
+    <xsl:apply-templates mode="tabular"/>
+  <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 -->
 

Modified: httpd/httpd/branches/2.4.x/docs/manual/style/latex/directiveindex.xsl
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/docs/manual/style/latex/directiveindex.xsl?rev=1562412&r1=1562411&r2=1562412&view=diff
==============================================================================
--- httpd/httpd/branches/2.4.x/docs/manual/style/latex/directiveindex.xsl (original)
+++ httpd/httpd/branches/2.4.x/docs/manual/style/latex/directiveindex.xsl Wed Jan 29 11:24:40 2014
@@ -23,39 +23,10 @@
 
 <!-- ==================================================================== -->
 <!-- <directiveindex>                                                     -->
-<!-- Builds the directive index page                                      -->
+<!-- (Ignored)                                                            -->
 <!-- ==================================================================== -->
-<xsl:template match="directiveindex">
+<xsl:template match="directiveindex" />
 
-    <xsl:variable name="directives"
-        select="document(document($allmodules)/modulefilelist/modulefile)
-                /modulesynopsis[status!='Obsolete']
-                /directivesynopsis[not(@location)]" />
-
-
-  <xsl:call-template name="section-title"/>
-
-  <xsl:apply-templates select="summary" />
-
-  <xsl:call-template name="seealso"/>
-
-  <xsl:text>\begin{itemize}
-</xsl:text>
-  <xsl:for-each select="$directives">
-  <xsl:sort select="name" />
-
-  <xsl:text>
-\item </xsl:text>
-  <xsl:apply-templates select="name" mode="simple"/>
-  <xsl:text> (p.\ \pageref{/mod/</xsl:text>
-  <xsl:value-of select="../name"/><xsl:text>:</xsl:text>
-  <xsl:value-of select="translate(name, $uppercase, $lowercase)"/>
-  <xsl:text>})</xsl:text>
-</xsl:for-each>
-
-  <xsl:text>\end{itemize}</xsl:text>
-
-</xsl:template>
 <!-- /directiveindex -->
 
 </xsl:stylesheet>

Modified: httpd/httpd/branches/2.4.x/docs/manual/style/latex/html.xsl
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/docs/manual/style/latex/html.xsl?rev=1562412&r1=1562411&r2=1562412&view=diff
==============================================================================
--- httpd/httpd/branches/2.4.x/docs/manual/style/latex/html.xsl (original)
+++ httpd/httpd/branches/2.4.x/docs/manual/style/latex/html.xsl Wed Jan 29 11:24:40 2014
@@ -1,4 +1,7 @@
 <?xml version="1.0"?>
+<!DOCTYPE xsl:stylesheet [
+    <!ENTITY lf SYSTEM "../xsl/util/lf.xml">
+]>
 
 <!--
  Licensed to the Apache Software Foundation (ASF) under one or more
@@ -27,34 +30,27 @@
 <!-- ==================================================================== -->
 
 <xsl:template match="ul">
-<xsl:text>\begin{itemize}
-</xsl:text>
+<xsl:text>\begin{itemize}</xsl:text>&lf;
 <xsl:apply-templates/>
-<xsl:text>\end{itemize}
-</xsl:text>
+<xsl:text>\end{itemize}</xsl:text>&lf;
 </xsl:template>
 
 <xsl:template match="ol">
-<xsl:text>\begin{enumerate}
-</xsl:text>
+<xsl:text>\begin{enumerate}</xsl:text>&lf;
 <xsl:apply-templates/>
-<xsl:text>\end{enumerate}
-</xsl:text>
+<xsl:text>\end{enumerate}</xsl:text>&lf;
 </xsl:template>
 
 <xsl:template match="li">
 <xsl:text>\item </xsl:text>
 <xsl:apply-templates/>
-<xsl:text>
-</xsl:text>
+&lf;
 </xsl:template>
 
 <xsl:template match="dl">
-<xsl:text>\begin{description}
-</xsl:text>
+<xsl:text>\begin{description}</xsl:text>&lf;
 <xsl:apply-templates/>
-<xsl:text>\end{description}
-</xsl:text>
+<xsl:text>\end{description}</xsl:text>&lf;
 </xsl:template>
 
 <xsl:template match="dt">
@@ -66,10 +62,24 @@
 <xsl:apply-templates/>
 </xsl:template>
 
+<xsl:template match="br">
+<xsl:call-template name="br">
+<xsl:with-param name="result" select="'\\'" />
+</xsl:call-template>
+</xsl:template>
+
+<xsl:template match="br" mode="tabular">
+<xsl:call-template name="br">
+<xsl:with-param name="result" select="'\newline'" />
+</xsl:call-template>
+</xsl:template>
+
 <!-- Latex doesn't like successive line breaks, so replace any
      sequence of two or more br separated only by white-space with
      one line break followed by smallskips. -->
-<xsl:template match="br">
+<xsl:template name="br">
+<xsl:param name="result" />
+
 <xsl:choose>
 <xsl:when test="name(preceding-sibling::node()[1])='br' or name(preceding-sibling::node()[1])='indent'">
 <xsl:text>\smallskip </xsl:text>
@@ -82,7 +92,8 @@
   <xsl:otherwise>
     <!-- Don't put a line break if we are the last thing -->
     <xsl:if test="not(position()=last()) and not(position()=last()-1 and normalize-space(following-sibling::node()[1])='')">
-      <xsl:text>\\ </xsl:text>
+      <xsl:value-of select="$result" />
+      <xsl:text> </xsl:text>
     </xsl:if>
   </xsl:otherwise>
   </xsl:choose>
@@ -90,7 +101,8 @@
 <xsl:otherwise>
     <!-- Don't put a line break if we are the last thing -->
     <xsl:if test="not(position()=last()) and not(position()=last()-1 and normalize-space(following-sibling::node()[1])='')">
-      <xsl:text>\\ </xsl:text>
+      <xsl:value-of select="$result" />
+      <xsl:text> </xsl:text>
     </xsl:if>
 </xsl:otherwise>
 </xsl:choose>
@@ -98,45 +110,88 @@
 
 <xsl:template match="p">
 <xsl:apply-templates/>
-<xsl:text>\par
-</xsl:text>
+<xsl:text>\par</xsl:text>&lf;
 </xsl:template>
 
-<xsl:template match="code">
+<xsl:template match="code|program">
 <xsl:text>\texttt{</xsl:text>
 <xsl:apply-templates/>
 <xsl:text>}</xsl:text>
 </xsl:template>
 
+<xsl:template match="code|program" mode="tabular">
+<xsl:text>\texttt{</xsl:text>
+<xsl:apply-templates mode="tabular"/>
+<xsl:text>}</xsl:text>
+</xsl:template>
+
 <xsl:template match="strong">
 <xsl:text>\textbf{</xsl:text>
 <xsl:apply-templates/>
 <xsl:text>}</xsl:text>
 </xsl:template>
 
-<xsl:template match="em">
+<xsl:template match="strong" mode="tabular">
+<xsl:text>\textbf{</xsl:text>
+<xsl:apply-templates mode="tabular"/>
+<xsl:text>}</xsl:text>
+</xsl:template>
+
+<xsl:template match="em|var|cite|q|dfn">
 <xsl:text>\textit{</xsl:text>
-<xsl:apply-templates/>
+<xsl:apply-templates mode="tabular"/>
 <xsl:text>}</xsl:text>
 </xsl:template>
 
+<!-- O(log(n)) (stack usage!) string reverter -->
+<xsl:template name="string-reverse">
+<xsl:param name="string"/>
+<xsl:variable name="length" select="string-length($string)"/>
+
+<xsl:choose>
+<xsl:when test="$length &lt; 2">
+  <xsl:value-of select="$string"/>
+</xsl:when>
+<xsl:when test="$length = 2">
+  <xsl:value-of select="concat(substring($string, 2, 1), substring($string, 1, 1))"/>
+</xsl:when>
+<xsl:otherwise>
+  <xsl:variable name="middle" select="floor($length div 2)"/>
+
+  <xsl:call-template name="string-reverse">
+    <xsl:with-param name="string" select="substring($string, $middle + 1, $middle + 1)"/>
+  </xsl:call-template>
+  <xsl:call-template name="string-reverse">
+    <xsl:with-param name="string" select="substring($string, 1, $middle)"/>
+  </xsl:call-template>
+</xsl:otherwise>
+</xsl:choose>
+</xsl:template>
+
 <!-- Value-of used here explicitly because we don't wan't latex-escaping
 performed.  Of course, this will conflict with html where some tags are
 interpreted in pre -->
-<xsl:template match="pre">
-<xsl:text>\begin{verbatim}
-</xsl:text>
-<xsl:value-of select="."/>
-<xsl:text>\end{verbatim}
-</xsl:text>
+<xsl:template match="pre|highlight">
+<xsl:text>\begin{verbatim}</xsl:text>
+
+<!-- string trimming: ltrim is easy, rtrim is not. so, we're sneaky and use
+ltrim only. The output is then: string-reverse(ltrim(string-reverse(ltrim(.)))) -->
+<xsl:variable name="reversed">
+<xsl:call-template name="string-reverse">
+<xsl:with-param name="string" select="substring(., string-length(substring-before(., substring(normalize-space(.), 1, 1))) + 1, string-length(.))"/>
+</xsl:call-template>
+</xsl:variable>
+<xsl:call-template name="string-reverse">
+<xsl:with-param name="string" select="substring($reversed, string-length(substring-before($reversed, substring(normalize-space($reversed), 1, 1))) + 1, string-length($reversed))"/>
+</xsl:call-template>
+
+<xsl:text>\end{verbatim}</xsl:text>&lf;
 </xsl:template>
 
 <xsl:template match="blockquote">
-<xsl:text>\begin{quotation}
-</xsl:text>
+<xsl:text>\begin{quotation}</xsl:text>&lf;
 <xsl:apply-templates/>
-<xsl:text>\end{quotation}
-</xsl:text>
+<xsl:text>\end{quotation}</xsl:text>&lf;
 </xsl:template>
 
 <!-- XXX: We need to deal with table headers -->
@@ -169,13 +224,11 @@ interpreted in pre -->
   </xsl:for-each>
 </xsl:otherwise>
 </xsl:choose>
-<xsl:text>|}\hline
-</xsl:text>
+<xsl:text>|}\hline</xsl:text>&lf;
 <xsl:apply-templates select="tr"/>
 <xsl:text>\hline\end{</xsl:text>
 <xsl:value-of select="$table-type"/>
-<xsl:text>}
-</xsl:text>
+<xsl:text>}</xsl:text>&lf;
 </xsl:template>
 
 <xsl:template match="tr">
@@ -184,8 +237,7 @@ interpreted in pre -->
   <xsl:if test="../@border and not(position()=last())">
     <xsl:text>\hline</xsl:text>
   </xsl:if>
-  <xsl:text>
-</xsl:text>
+  &lf;
 </xsl:template>
 
 <xsl:template match="td">
@@ -244,31 +296,62 @@ interpreted in pre -->
    3. It is also necessary to deal with the fact that index pages
       get references as "/".
 -->
+<xsl:template match="a" mode="tabular">
+<xsl:apply-templates mode="tabular"/>
+<xsl:call-template name="a"/>
+</xsl:template>
+
 <xsl:template match="a">
 <xsl:apply-templates/>
+<xsl:call-template name="a"/>
+</xsl:template>
+
+<xsl:template name="a">
 <xsl:if test="@href">
 <xsl:variable name="relpath" select="document(/*/@metafile)/metafile/relpath" />
 <xsl:variable name="path" select="document(/*/@metafile)/metafile/path" />
+<xsl:variable name="href">
+  <xsl:choose>
+  <xsl:when test="starts-with(@href, './')">
+    <xsl:value-of select="substring(@href, 3)" />
+  </xsl:when>
+  <xsl:otherwise>
+    <xsl:value-of select="@href" />
+  </xsl:otherwise>
+  </xsl:choose>
+</xsl:variable>
 <xsl:variable name="fileref">
   <xsl:choose>
-  <xsl:when test="contains(@href, '.html')">
-    <xsl:value-of select="substring-before(@href, '.html')"/>
+  <xsl:when test="contains($href, '.html')">
+    <xsl:value-of select="substring-before($href, '.html')"/>
   </xsl:when>
   <xsl:otherwise>
-    <xsl:value-of select="concat(@href, 'index')"/>
+    <xsl:value-of select="concat($href, 'index')"/>
   </xsl:otherwise>
   </xsl:choose>
 </xsl:variable>
 <xsl:choose>
 
-<xsl:when test="starts-with(@href, 'http:') or starts-with(@href, 'news:') or starts-with(@href, 'mailto:')">
+<xsl:when test="starts-with(@href, 'http:') or starts-with(@href, 'https:') or starts-with(@href, 'ftp:') or starts-with(@href, 'news:') or starts-with(@href, 'mailto:')">
   <xsl:if test="not(.=@href)">
     <xsl:text>\footnote{</xsl:text>
       <xsl:text>\href{</xsl:text>
       <xsl:call-template name="replace-string">
-        <xsl:with-param name="text" select="@href"/>
-        <xsl:with-param name="replace" select="'#'"/>
-        <xsl:with-param name="with" select="'\#'"/>
+        <xsl:with-param name="replace" select="'%'"/>
+        <xsl:with-param name="with" select="'\%'"/>
+        <xsl:with-param name="text">
+          <xsl:call-template name="replace-string">
+            <xsl:with-param name="replace" select="'_'"/>
+            <xsl:with-param name="with" select="'\_'"/>
+            <xsl:with-param name="text">
+              <xsl:call-template name="replace-string">
+                <xsl:with-param name="replace" select="'#'"/>
+                <xsl:with-param name="with" select="'\#'"/>
+                <xsl:with-param name="text" select="@href"/>
+              </xsl:call-template>
+            </xsl:with-param>
+          </xsl:call-template>
+        </xsl:with-param>
       </xsl:call-template>
       <xsl:text>}{</xsl:text>
     <xsl:call-template name="ltescape">
@@ -310,6 +393,14 @@ interpreted in pre -->
 </xsl:template>
 
 <xsl:template match="img">
+<xsl:call-template name="img"/>
+</xsl:template>
+
+<xsl:template match="img" mode="tabular">
+<xsl:call-template name="img"/>
+</xsl:template>
+
+<xsl:template name="img">
 <xsl:variable name="path" select="document(/*/@metafile)/metafile/path" />
 <xsl:text>\includegraphics{</xsl:text>
       <xsl:call-template name="replace-string">

Modified: httpd/httpd/branches/2.4.x/docs/manual/style/latex/latex.xsl
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/docs/manual/style/latex/latex.xsl?rev=1562412&r1=1562411&r2=1562412&view=diff
==============================================================================
--- httpd/httpd/branches/2.4.x/docs/manual/style/latex/latex.xsl (original)
+++ httpd/httpd/branches/2.4.x/docs/manual/style/latex/latex.xsl Wed Jan 29 11:24:40 2014
@@ -1,5 +1,6 @@
 <?xml version="1.0" encoding="ISO-8859-1"?>
 <!DOCTYPE xsl:stylesheet [
+    <!ENTITY lf SYSTEM "../xsl/util/lf.xml">
     <!ENTITY % HTTPD-VERSION SYSTEM "../version.ent">
     %HTTPD-VERSION;
 ]>
@@ -144,7 +145,11 @@ Server Documentation Project.  More info
 </xsl:text>
     <xsl:apply-templates/>
     <xsl:if test="@id = 'modules'">
+        <xsl:text>\include{mod/index}</xsl:text>&lf;
         <xsl:apply-templates select="document($allmodules)/modulefilelist" />
+        <xsl:text>\include{mod/module-dict}</xsl:text>&lf;
+        <xsl:text>\include{mod/directive-dict}</xsl:text>&lf;
+        <xsl:text>\include{mod/quickreference}</xsl:text>&lf;
     </xsl:if>
 </xsl:for-each>
 
@@ -152,17 +157,18 @@ Server Documentation Project.  More info
 </xsl:template>
 
 <xsl:template match="page">
-<xsl:text>\include{</xsl:text>
-<xsl:choose>
-<xsl:when test="contains(@href,'.')">
-  <xsl:value-of select="substring-before(@href,'.')"/>
-</xsl:when>
-<xsl:otherwise>
-  <xsl:value-of select="concat(@href,'index')"/>
-</xsl:otherwise>
-</xsl:choose>
-<xsl:text>}
-</xsl:text>
+<xsl:if test="not(starts-with(@href,'http:') or starts-with(@href, 'https:') or starts-with(@href, 'mod/'))">
+  <xsl:text>\include{</xsl:text>
+  <xsl:choose>
+  <xsl:when test="contains(@href,'.')">
+    <xsl:value-of select="substring-before(@href,'.')"/>
+  </xsl:when>
+  <xsl:otherwise>
+    <xsl:value-of select="concat(@href,'index')"/>
+  </xsl:otherwise>
+  </xsl:choose>
+  <xsl:text>}</xsl:text>&lf;
+</xsl:if>
 </xsl:template>
 
 <xsl:template match="category/title" mode="printcat">
@@ -178,8 +184,7 @@ Server Documentation Project.  More info
 <xsl:template match="modulefile">
 <xsl:text>\include{mod/</xsl:text>
 <xsl:value-of select="substring-before(.,'.')"/>
-<xsl:text>}
-</xsl:text>
+<xsl:text>}</xsl:text>&lf;
 </xsl:template>
 
 <xsl:template match="summary">
@@ -211,6 +216,12 @@ Server Documentation Project.  More info
 <!-- Take care of all the LaTeX special characters.                       -->
 <!-- Silly multi-variable technique used to avoid deep recursion.         -->
 <!-- ==================================================================== -->
+<xsl:template match="text()|@*" mode="tabular">
+<xsl:call-template name="ltescape">
+  <xsl:with-param name="string" select="."/>
+</xsl:call-template>
+</xsl:template>
+
 <xsl:template match="text()">
 <xsl:call-template name="ltescape">
   <xsl:with-param name="string" select="."/>

Modified: httpd/httpd/branches/2.4.x/docs/manual/style/latex/quickreference.xsl
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/docs/manual/style/latex/quickreference.xsl?rev=1562412&r1=1562411&r2=1562412&view=diff
==============================================================================
--- httpd/httpd/branches/2.4.x/docs/manual/style/latex/quickreference.xsl (original)
+++ httpd/httpd/branches/2.4.x/docs/manual/style/latex/quickreference.xsl Wed Jan 29 11:24:40 2014
@@ -1,4 +1,7 @@
 <?xml version="1.0"?>
+<!DOCTYPE xsl:stylesheet [
+    <!ENTITY lf SYSTEM "../xsl/util/lf.xml">
+]>
 
 <!--
  Licensed to the Apache Software Foundation (ASF) under one or more
@@ -28,6 +31,7 @@
 <xsl:template match="quickreference">
 
   <xsl:call-template name="section-title"/>
+  <xsl:text>\label{/mod/directives}</xsl:text>&lf;
 
   <xsl:apply-templates select="summary"/>
 
@@ -39,11 +43,10 @@
        select="document(document($allmodules)/modulefilelist/modulefile)
          /modulesynopsis/directivesynopsis[not(@location)]" />
 
-  <xsl:text>\footnotesize
-</xsl:text>
+  <xsl:text>\footnotesize</xsl:text>&lf;
 
-  <xsl:text>\begin{longtable}{p{.60\textwidth}p{.25\textwidth}ll}\hline
-</xsl:text>
+  <xsl:text>\begin{longtable}{p{.60\textwidth}p{.25\textwidth}ll}\hline/</xsl:text>
+  &lf;
 
 <xsl:for-each
    select="$directives[translate(substring(normalize-space(name), 1,1),
@@ -51,7 +54,7 @@
 <xsl:sort select="name" />
 
    <xsl:text>\texttt{</xsl:text>
-   <xsl:apply-templates select="syntax" />
+   <xsl:apply-templates select="syntax" mode="tabular" />
    <xsl:text>}</xsl:text>
    <xsl:text>&amp;</xsl:text>
 
@@ -106,8 +109,7 @@
         <xsl:variable name="status" select="translate(
             ../status, $uppercase, $lowercase)"/>
         <xsl:value-of select="$message[@id=$status]/@letter"/>
-     <xsl:text>\\*
-</xsl:text>
+     <xsl:text>\\*</xsl:text>&lf;
 
       <xsl:text>\multicolumn{4}{l}{\begin{minipage}[t]{.95\textwidth}</xsl:text>
          <xsl:choose>
@@ -125,13 +127,12 @@
       <xsl:text>}</xsl:text>
 
 
-    <xsl:text>\end{minipage}} \\ \hline
-</xsl:text>
+    <xsl:text>\end{minipage}} \\ \hline</xsl:text>&lf;
 
   </xsl:for-each> <!-- /directives -->
 
-  <xsl:text>\end{longtable}
-\normalsize</xsl:text>
+  <xsl:text>\end{longtable}</xsl:text>&lf;
+  <xsl:text>\normalsize</xsl:text>
 
 </xsl:template>
 

Modified: httpd/httpd/branches/2.4.x/docs/manual/style/latex/synopsis.xsl
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/docs/manual/style/latex/synopsis.xsl?rev=1562412&r1=1562411&r2=1562412&view=diff
==============================================================================
--- httpd/httpd/branches/2.4.x/docs/manual/style/latex/synopsis.xsl (original)
+++ httpd/httpd/branches/2.4.x/docs/manual/style/latex/synopsis.xsl Wed Jan 29 11:24:40 2014
@@ -208,7 +208,7 @@
 
 <xsl:value-of select="$message[@id='syntax']" />
 <xsl:text>: &amp; {\ttfamily </xsl:text>
-<xsl:apply-templates select="syntax" />
+<xsl:apply-templates select="syntax" mode="tabular" />
 <xsl:text>}\\
 </xsl:text>
 

Modified: httpd/httpd/branches/2.4.x/docs/manual/style/xsl/common.xsl
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/docs/manual/style/xsl/common.xsl?rev=1562412&r1=1562411&r2=1562412&view=diff
==============================================================================
--- httpd/httpd/branches/2.4.x/docs/manual/style/xsl/common.xsl (original)
+++ httpd/httpd/branches/2.4.x/docs/manual/style/xsl/common.xsl Wed Jan 29 11:24:40 2014
@@ -712,11 +712,21 @@ 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">
+        <xsl:when test="$in-modulesynopsis and normalize-space(@module) = /modulesynopsis/name">
             <a href="#{$lowerdirective}">
                 <xsl:if test="@type='section'">&lt;</xsl:if>
                 <xsl:value-of select="."/>
@@ -724,7 +734,7 @@ if (typeof(prettyPrint) !== 'undefined')
             </a>
         </xsl:when>
         <xsl:otherwise>
-            <a href="{$path}/mod/{@module}.html#{$lowerdirective}">
+            <a href="{$path}/mod/{normalize-space(@module)}.html#{$lowerdirective}">
                 <xsl:if test="@type='section'">&lt;</xsl:if>
                 <xsl:value-of select="."/>
                 <xsl:if test="@type='section'">&gt;</xsl:if>
@@ -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/{normalize-space(.)}.html">
+            <xsl:value-of select="."/>
+        </a>
+    </xsl:otherwise>
+    </xsl:choose>
 </code>
 </xsl:template>
 <!-- /module -->