You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by sl...@apache.org on 2003/06/19 20:36:07 UTC

cvs commit: httpd-2.0/docs/manual/style/latex faq.xsl quickreference.xsl TODO common.xsl directiveindex.xsl html.xsl latex.xsl manualpage.xsl moduleindex.xsl synopsis.xsl

slive       2003/06/19 11:36:07

  Modified:    docs/manual/style/latex TODO common.xsl directiveindex.xsl
                        html.xsl latex.xsl manualpage.xsl moduleindex.xsl
                        synopsis.xsl
  Added:       docs/manual/style/latex faq.xsl quickreference.xsl
  Log:
  LaTeX:
  
  - Add transformations of quickreference and faq.
  
  - Move <seealso> and the titles to their own templates to avoid
  repeating code.
  
  - Fix external directives.
  
  Revision  Changes    Path
  1.8       +2 -10     httpd-2.0/docs/manual/style/latex/TODO
  
  Index: TODO
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/docs/manual/style/latex/TODO,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -d -b -u -r1.7 -r1.8
  --- TODO	16 Jun 2003 15:03:58 -0000	1.7
  +++ TODO	19 Jun 2003 18:36:06 -0000	1.8
  @@ -1,12 +1,5 @@
   Some things that need to be done with the LaTeX transforms:
   
  -- Finish special pages:
  -  * quick reference
  -  * faq
  -  [This is a good job for someone who wants to get familiar with LaTeX,
  -   since you can just take the existing LaTeX as an example, and combine
  -   it with the xslt stuff under style/xsl/.]
  -
   - Tables
     Add <columnspec> to xml files.
   
  @@ -21,9 +14,6 @@
     not be feasible for us, in which case we could simply replace
     " with \texttt{"} or something, so that the quotes are all straight.
   
  -- Fix page references on "external" directives
  -  (<directivesynopsis location=...)
  -
   - Hundreds of other little problems with presentation, cross-referencing,
     etc.
   
  @@ -36,5 +26,7 @@
     drop this and manually adjust the relevant spacing.
   
   - Reduce the size of the pdf (both bytes and pages) in any way possible.
  +
  +- Speed up the XSLT tranform.
   
   - Translations.
  
  
  
  1.7       +39 -4     httpd-2.0/docs/manual/style/latex/common.xsl
  
  Index: common.xsl
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/docs/manual/style/latex/common.xsl,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -d -b -u -r1.6 -r1.7
  --- common.xsl	16 Jun 2003 15:03:59 -0000	1.6
  +++ common.xsl	19 Jun 2003 18:36:06 -0000	1.7
  @@ -57,15 +57,15 @@
   <!-- ==================================================================== -->
   <!-- <example>                                                            -->
   <!-- ==================================================================== -->
  -
  +<!-- 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:text>\begin{minipage}{.8\textwidth}\begin{flushleft}</xsl:text>
   <xsl:apply-templates select="title" mode="print" />
  -<xsl:if test="not(pre)"><xsl:text>{\ttfamily\small </xsl:text></xsl:if>
  +<xsl:text>{\ttfamily\small </xsl:text>
   <xsl:text>\noindent </xsl:text><xsl:apply-templates/>
  -<xsl:if test="not(pre)"><xsl:text>}</xsl:text></xsl:if>
  +<xsl:text>}</xsl:text>
   <xsl:text>\end{flushleft}\end{minipage}</xsl:text>
   <xsl:if test="not(pre)"><xsl:text>}</xsl:text></xsl:if>
   <xsl:text>\end{center}\par\smallskip</xsl:text>
  @@ -188,4 +188,39 @@
   </xsl:text>
   </xsl:template>
   
  +
  +<!-- ==================================================================== -->
  +<!-- <seealso>                                                            -->
  +<!-- ==================================================================== -->
  +<xsl:template name="seealso">
  +     <xsl:if test="seealso">
  +	<xsl:text>\textbf{</xsl:text>
  +        <xsl:value-of select="$messages/message [@name='seealso']" />
  +        <xsl:text>}\begin{itemize}</xsl:text>
  +        <xsl:for-each select="seealso">
  +        <xsl:text>\item </xsl:text>
  +          <xsl:apply-templates />
  +        <xsl:text>
  +</xsl:text>
  +        </xsl:for-each>
  +<xsl:text>\end{itemize}</xsl:text>
  +     </xsl:if>
  +</xsl:template>
  +
  +
  +<!-- ==================================================================== -->
  +<!-- section-title                                                        -->
  +<!-- ==================================================================== -->
  +<xsl:template name="section-title">
  +<xsl:variable name="metafile" select="document(/*/@metafile)/metafile" />
  +<xsl:text>\section{</xsl:text><xsl:apply-templates select="title"/>
  +<xsl:text>}</xsl:text>
  +<xsl:text>\label{</xsl:text><xsl:value-of 
  +select="$metafile/path"/><xsl:value-of 
  +select="$metafile/basename"/>
  +<xsl:text>}
  +</xsl:text>
  +</xsl:template>
  +
   </xsl:stylesheet>
  \ No newline at end of file
  +
  
  
  
  1.2       +3 -9      httpd-2.0/docs/manual/style/latex/directiveindex.xsl
  
  Index: directiveindex.xsl
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/docs/manual/style/latex/directiveindex.xsl,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -d -b -u -r1.1 -r1.2
  --- directiveindex.xsl	12 Jun 2003 19:50:41 -0000	1.1
  +++ directiveindex.xsl	19 Jun 2003 18:36:06 -0000	1.2
  @@ -68,17 +68,11 @@
                   /directivesynopsis[not(@location)]" />
   
   
  -  <xsl:variable name="metafile" select="document(/*/@metafile)/metafile" /> 
  -
  -  <xsl:text>\section{</xsl:text><xsl:apply-templates select="title"/>
  -  <xsl:text>}</xsl:text>
  -  <xsl:text>\label{</xsl:text>
  -  <xsl:value-of select="$metafile/path"/>
  -  <xsl:value-of select="$metafile/basename"/>
  -  <xsl:text>}
  -</xsl:text>
  +  <xsl:call-template name="section-title"/>
   
      <xsl:apply-templates select="summary" />
  +
  +  <xsl:call-template name="seealso"/>
   
     <xsl:text>\begin{itemize}
   </xsl:text>
  
  
  
  1.8       +2 -2      httpd-2.0/docs/manual/style/latex/html.xsl
  
  Index: html.xsl
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/docs/manual/style/latex/html.xsl,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -d -b -u -r1.7 -r1.8
  --- html.xsl	13 Jun 2003 15:08:58 -0000	1.7
  +++ html.xsl	19 Jun 2003 18:36:06 -0000	1.8
  @@ -170,7 +170,7 @@
         <xsl:value-of select=".95 div last()"/>
       </xsl:otherwise>
       </xsl:choose>
  -    <xsl:text>\linewidth}\small </xsl:text>
  +    <xsl:text>\textwidth}\small </xsl:text>
       <xsl:apply-templates/>
       <xsl:text>\end{minipage}</xsl:text>
       <xsl:if test="not(position()=last())">
  @@ -189,7 +189,7 @@
         <xsl:value-of select=".95 div last()"/>
       </xsl:otherwise>
       </xsl:choose>
  -    <xsl:text>\linewidth}\bfseries </xsl:text>
  +    <xsl:text>\textwidth}\bfseries </xsl:text>
       <xsl:apply-templates/>
       <xsl:text>\end{minipage}</xsl:text>
       <xsl:if test="not(position()=last())">
  
  
  
  1.7       +8 -1      httpd-2.0/docs/manual/style/latex/latex.xsl
  
  Index: latex.xsl
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/docs/manual/style/latex/latex.xsl,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -d -b -u -r1.6 -r1.7
  --- latex.xsl	16 Jun 2003 15:03:59 -0000	1.6
  +++ latex.xsl	19 Jun 2003 18:36:06 -0000	1.7
  @@ -18,14 +18,17 @@
   <xsl:include href="synopsis.xsl" />
   <xsl:include href="moduleindex.xsl" />
   <xsl:include href="directiveindex.xsl" />
  +<xsl:include href="faq.xsl" />
  +<xsl:include href="quickreference.xsl" />
   
   <xsl:template match="sitemap">
   <xsl:text>
   \documentclass[11pt]{book}
   \usepackage{times}
  +\usepackage{longtable}
   \usepackage{style/latex/atbeginend}
   %\usepackage[pdftex]{color}
  -\usepackage[colorlinks=true,letterpaper=true]{hyperref}
  +\usepackage[colorlinks=true,letterpaper=true,linkcolor=green,urlcolor=blue]{hyperref}
   
   % Let LaTeX be lenient about very-bad line wrapping.
   \tolerance=9999 
  @@ -224,6 +227,10 @@
    </xsl:choose>
   </xsl:variable>
   
  +<!-- The '[' and ']' characters don't, in general, need to be
  +  escaped.  But there are times when it is ambiguous whether
  +  [ is the beginning of an optional argument or a literal '['.
  +  Hence, it is safer to protect the literal ones with {}. -->
   <xsl:variable name="result5">
    <xsl:choose>
    <xsl:when test="contains($result4, '[')">
  
  
  
  1.3       +3 -19     httpd-2.0/docs/manual/style/latex/manualpage.xsl
  
  Index: manualpage.xsl
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/docs/manual/style/latex/manualpage.xsl,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -d -b -u -r1.2 -r1.3
  --- manualpage.xsl	5 Jun 2003 15:16:27 -0000	1.2
  +++ manualpage.xsl	19 Jun 2003 18:36:06 -0000	1.3
  @@ -4,28 +4,12 @@
                     xmlns="http://www.w3.org/1999/xhtml">
   
   <xsl:template match="manualpage">
  -<xsl:variable name="metafile" select="document(/*/@metafile)/metafile" />
   
  -<xsl:text>\section{</xsl:text><xsl:apply-templates select="title"/>
  -<xsl:text>}</xsl:text>
  -<xsl:text>\label{</xsl:text><xsl:value-of 
  -select="$metafile/path"/><xsl:value-of 
  -select="$metafile/basename"/>
  -<xsl:text>}
  -</xsl:text>
  -<xsl:apply-templates select="summary"/>
  +<xsl:call-template name="section-title"/>
   
  +<xsl:apply-templates select="summary"/>
   
  -   <xsl:if test="seealso">
  -   <xsl:text>\medskip\noindent\textbf{</xsl:text>
  -   <xsl:value-of select="$messages/message[@name='seealso']" />
  -   <xsl:text>}
  -   \begin{itemize}</xsl:text>
  -   <xsl:for-each select="seealso">
  -     <xsl:text>\item </xsl:text><xsl:apply-templates />
  -   </xsl:for-each>
  -   \end{itemize}
  -   </xsl:if>
  +<xsl:call-template name="seealso"/>
   
   <xsl:apply-templates select="section"/>
   </xsl:template>
  
  
  
  1.2       +2 -18     httpd-2.0/docs/manual/style/latex/moduleindex.xsl
  
  Index: moduleindex.xsl
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/docs/manual/style/latex/moduleindex.xsl,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -d -b -u -r1.1 -r1.2
  --- moduleindex.xsl	12 Jun 2003 15:12:47 -0000	1.1
  +++ moduleindex.xsl	19 Jun 2003 18:36:06 -0000	1.2
  @@ -64,27 +64,11 @@
   
     <xsl:variable name="metafile" select="document(/*/@metafile)/metafile" /> 
   
  -  <xsl:text>\section{</xsl:text><xsl:apply-templates select="title"/>
  -  <xsl:text>}</xsl:text>
  -  <xsl:text>\label{</xsl:text>
  -  <xsl:value-of select="$metafile/path"/>
  -  <xsl:value-of select="$metafile/basename"/>
  -  <xsl:text>}
  -</xsl:text>
  +  <xsl:call-template name="section-title"/>
   
     <xsl:apply-templates select="summary"/>
   
  -   <xsl:if test="seealso">
  -   <xsl:text>\medskip\noindent\textbf{</xsl:text>
  -   <xsl:value-of select="$messages/message[@name='seealso']" />
  -   <xsl:text>}
  -   \begin{itemize}</xsl:text>
  -   <xsl:for-each select="seealso">
  -     <xsl:text>\item </xsl:text><xsl:apply-templates />
  -   </xsl:for-each>
  -   \end{itemize}
  -   </xsl:if>
  -
  +  <xsl:call-template name="seealso"/>
   
      <xsl:text>\subsection*{</xsl:text>
      <xsl:value-of select="$messages/message[@name='corefeatures']" />
  
  
  
  1.4       +4 -28     httpd-2.0/docs/manual/style/latex/synopsis.xsl
  
  Index: synopsis.xsl
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/docs/manual/style/latex/synopsis.xsl,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -d -b -u -r1.3 -r1.4
  --- synopsis.xsl	10 Jun 2003 18:29:05 -0000	1.3
  +++ synopsis.xsl	19 Jun 2003 18:36:06 -0000	1.4
  @@ -108,7 +108,7 @@
            <xsl:if test="@location">
              <xsl:variable name="lowerlocation"
               select="translate(@location, $uppercase, $lowercase)" />
  -           <xsl:text> (p.\ \pageref{</xsl:text>
  +           <xsl:text> (p.\ \pageref{/mod/</xsl:text>
              <xsl:value-of select="concat(translate(@location,$uppercase,$lowercase),':',translate(name,$uppercase,$lowercase))"/>
              <xsl:text>}) </xsl:text>
            </xsl:if>
  @@ -128,18 +128,7 @@
        <xsl:text>
   </xsl:text>
   
  -     <xsl:if test="seealso">
  -	<xsl:text>\textbf{</xsl:text>
  -        <xsl:value-of select="$messages/message [@name='seealso']" />
  -        <xsl:text>}\begin{itemize}</xsl:text>
  -        <xsl:for-each select="seealso">
  -        <xsl:text>\item </xsl:text>
  -          <xsl:apply-templates />
  -        <xsl:text>
  -</xsl:text>
  -        </xsl:for-each>
  -<xsl:text>\end{itemize}</xsl:text>
  -     </xsl:if>
  +<xsl:call-template name="seealso"/>
   
        <!-- Sections of documentation about the module as a whole -->
          <xsl:apply-templates select="section" />
  @@ -261,22 +250,9 @@
   
   <xsl:apply-templates select="usage" />
   
  -<xsl:if test="seealso">
  -<xsl:text>\textbf{</xsl:text>
  -<xsl:value-of select="$messages/message[@name='seealso']" />
  -<xsl:text>}
  -\begin{itemize}
  -</xsl:text>
  -<xsl:for-each select="seealso">
  -<xsl:text>\item </xsl:text>
  -<xsl:apply-templates />
  -</xsl:for-each>
  -<xsl:text>\end{itemize}
  -</xsl:text>
  -</xsl:if>
  -
  -</xsl:if>
  +<xsl:call-template name="seealso"/>
   
  +</xsl:if> <!-- /not(@location) -->
   </xsl:template>
   <!-- /directivesynopsis -->
   
  
  
  
  1.1                  httpd-2.0/docs/manual/style/latex/faq.xsl
  
  Index: faq.xsl
  ===================================================================
  <?xml version="1.0"?><!--
  /* ====================================================================
   * The Apache Software License, Version 1.1
   *
   * Copyright (c) 2002-2003 The Apache Software Foundation.  All rights
   * reserved.
   *
   * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   *
   * 1. Redistributions of source code must retain the above copyright
   *    notice, this list of conditions and the following disclaimer.
   *
   * 2. Redistributions in binary form must reproduce the above copyright
   *    notice, this list of conditions and the following disclaimer in
   *    the documentation and/or other materials provided with the
   *    distribution.
   *
   * 3. The end-user documentation included with the redistribution,
   *    if any, must include the following acknowledgment:
   *       "This product includes software developed by the
   *        Apache Software Foundation (http://www.apache.org/)."
   *    Alternately, this acknowledgment may appear in the software itself,
   *    if and wherever such third-party acknowledgments normally appear.
   *
   * 4. The names "Apache" and "Apache Software Foundation" must
   *    not be used to endorse or promote products derived from this
   *    software without prior written permission. For written
   *    permission, please contact apache@apache.org.
   *
   * 5. Products derived from this software may not be called "Apache",
   *    nor may "Apache" appear in their name, without prior written
   *    permission of the Apache Software Foundation.
   *
   * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
   * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
   * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
   * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
   * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
   * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
   * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
   * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
   * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
   * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
   * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   * SUCH DAMAGE.
   * ====================================================================
   *
   * This software consists of voluntary contributions made by many
   * individuals on behalf of the Apache Software Foundation.  For more
   * information on the Apache Software Foundation, please see
   * <http://www.apache.org/>.
   */ -->
  <!DOCTYPE xsl:stylesheet [
      <!ENTITY lf SYSTEM "util/lf.xml">
  ]>
  <xsl:stylesheet version="1.0"
                xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                    xmlns="http://www.w3.org/1999/xhtml">
  
  <!-- ==================================================================== -->
  <!-- <faq>                                                                -->
  <!-- Process an entire document into an HTML page                         -->
  <!-- ==================================================================== -->
  <xsl:template match="faq">
  
  <xsl:call-template name="section-title"/>
  
  <xsl:apply-templates select="summary"/>
  
  <xsl:call-template name="seealso"/>
  
  <xsl:apply-templates select="section"/>
  
  </xsl:template>
  <!-- /faq -->
  </xsl:stylesheet>
  
  
  
  1.1                  httpd-2.0/docs/manual/style/latex/quickreference.xsl
  
  Index: quickreference.xsl
  ===================================================================
  <?xml version="1.0"?><!--
  /* ====================================================================
   * The Apache Software License, Version 1.1
   *
   * Copyright (c) 2002-2003 The Apache Software Foundation.  All rights
   * reserved.
   *
   * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   *
   * 1. Redistributions of source code must retain the above copyright
   *    notice, this list of conditions and the following disclaimer.
   *
   * 2. Redistributions in binary form must reproduce the above copyright
   *    notice, this list of conditions and the following disclaimer in
   *    the documentation and/or other materials provided with the
   *    distribution.
   *
   * 3. The end-user documentation included with the redistribution,
   *    if any, must include the following acknowledgment:
   *       "This product includes software developed by the
   *        Apache Software Foundation (http://www.apache.org/)."
   *    Alternately, this acknowledgment may appear in the software itself,
   *    if and wherever such third-party acknowledgments normally appear.
   *
   * 4. The names "Apache" and "Apache Software Foundation" must
   *    not be used to endorse or promote products derived from this
   *    software without prior written permission. For written
   *    permission, please contact apache@apache.org.
   *
   * 5. Products derived from this software may not be called "Apache",
   *    nor may "Apache" appear in their name, without prior written
   *    permission of the Apache Software Foundation.
   *
   * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
   * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
   * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
   * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
   * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
   * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
   * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
   * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
   * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
   * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
   * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   * SUCH DAMAGE.
   * ====================================================================
   *
   * This software consists of voluntary contributions made by many
   * individuals on behalf of the Apache Software Foundation.  For more
   * information on the Apache Software Foundation, please see
   * <http://www.apache.org/>.
   */ -->
  <xsl:stylesheet version="1.0"
                xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                    xmlns="http://www.w3.org/1999/xhtml">
  
  <!-- ==================================================================== -->
  <!-- <quickreference>                                                     -->
  <!-- Builds the directive quickreference page                             -->
  <!-- ==================================================================== -->
  <xsl:template match="quickreference">
  
    <xsl:call-template name="section-title"/>
  
    <xsl:apply-templates select="summary"/>
  
    <xsl:call-template name="seealso"/>
  
    <xsl:apply-templates select="legend"/>
  
    <xsl:variable name="directives"
         select="document(modulefilelist/modulefile)
           /modulesynopsis/directivesynopsis[not(@location)]" />
  
    <xsl:text>\footnotesize
  </xsl:text>
  
    <xsl:text>\begin{longtable}{p{.60\textwidth}p{.25\textwidth}ll}\hline
  </xsl:text>
  
  <xsl:for-each
     select="$directives[translate(substring(normalize-space(name), 1,1),
                                            $lowercase,$uppercase)]">
  <xsl:sort select="name" />
  
     <xsl:text>\texttt{</xsl:text>
     <xsl:apply-templates select="syntax" />
     <xsl:text>}</xsl:text>
     <xsl:text>&amp;</xsl:text>
  
     <!-- if the default value contains (at least) one <br />, -->
     <!-- this probably means that a short explanation follows -->
     <!-- the actual default value. We cut off the string      -->
     <!-- after the <br /> so it will not be shown here.       -->
     <!-- (add the + character instead)                        -->
     <xsl:variable name="default">
         <xsl:choose>
         <xsl:when test="count(default[count(br) &gt; 0]) &gt; 0">
            <xsl:value-of select="default/child::node()
                         [count(preceding-sibling::*) = 0]" />
         </xsl:when>
         <xsl:otherwise>
              <xsl:value-of select="default"/>
         </xsl:otherwise>
         </xsl:choose>
      </xsl:variable>
  
       <xsl:call-template name="ltescape">
          <xsl:with-param name="string">
              <xsl:value-of select="substring(substring-after(concat($default,
                                    ' '), name),1,20)" />
          </xsl:with-param>
        </xsl:call-template>
  
        <xsl:if test="string-length(substring-after(concat($default, ' '),
                  name)) &gt; 20 or count(default[count(br) &gt; 0]) &gt; 0">
           <xsl:text> +</xsl:text>
        </xsl:if>
  
        <xsl:text>&amp;</xsl:text>
  
              <xsl:if test="contextlist/context
                            [normalize-space(.)='server config']">s</xsl:if>
              <xsl:if test="contextlist/context
                            [normalize-space(.)='virtual host']">v</xsl:if>
              <xsl:if test="contextlist/context
                            [normalize-space(.)='directory']">d</xsl:if>
              <xsl:if test="contextlist/context
                            [normalize-space(.)='.htaccess']">h</xsl:if>
  
        <xsl:text>&amp;</xsl:text>
              <xsl:choose>
              <xsl:when test="../status='Base'">B</xsl:when>
              <xsl:when test="../status='MPM'">M</xsl:when>
              <xsl:when test="../status='Core'">C</xsl:when>
              <xsl:when test="../status='Extension'">E</xsl:when>
              <xsl:when test="../status='Experimental'">X</xsl:when>
              </xsl:choose>
  
       <xsl:text>\\*
  </xsl:text>
  
        <xsl:text>\multicolumn{4}{l}{\begin{minipage}[t]{.95\textwidth}</xsl:text>
           <xsl:choose>
           <xsl:when test="string-length(normalize-space(description)) &gt; 0">
               <xsl:apply-templates select="description"/>
           </xsl:when>
           <xsl:otherwise>
               <xsl:text>-</xsl:text>
           </xsl:otherwise>
           </xsl:choose>
  
        <xsl:text>\hfill 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:text>\end{minipage}} \\ \hline
  </xsl:text>
  
    </xsl:for-each> <!-- /directives -->
  
    <xsl:text>\end{longtable}
  \normalsize</xsl:text>
  
  </xsl:template>
  
  <xsl:template match="legend">
  <xsl:apply-templates/>
  </xsl:template>
  
  </xsl:stylesheet>