]> granicus.if.org Git - apache/commitdiff
XSLT instrastructure for the quickreference.
authorJoshua Slive <slive@apache.org>
Wed, 18 Sep 2002 22:31:23 +0000 (22:31 +0000)
committerJoshua Slive <slive@apache.org>
Wed, 18 Sep 2002 22:31:23 +0000 (22:31 +0000)
Still work to do on this, but I'm putting it in CVS so others can help.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@96886 13f79535-47bb-0310-9956-ffa450edef68

docs/manual/style/xsl/common.xsl
docs/manual/style/xsl/quickreference.xsl [new file with mode: 0644]

index 51f0533e5f67215816d7de038dfca751c0966e0f..713744de0da4566fac6e97ff8841cd933c512948 100644 (file)
@@ -39,6 +39,7 @@
   <xsl:include href="manualpage.xsl"/>
   <xsl:include href="synopsis.xsl"/>
   <xsl:include href="sitemap.xsl"/>
+  <xsl:include href="quickreference.xsl"/>
 
   <!--                                                            -->
   <!--    Utility templates for constructing pages                -->
diff --git a/docs/manual/style/xsl/quickreference.xsl b/docs/manual/style/xsl/quickreference.xsl
new file mode 100644 (file)
index 0000000..33b9736
--- /dev/null
@@ -0,0 +1,103 @@
+<?xml version="1.0"?>
+<!DOCTYPE xsl:stylesheet [ <!ENTITY nbsp "&#160;"> ]>
+<xsl:stylesheet version="1.0"
+              xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                  xmlns="http://www.w3.org/1999/xhtml">
+
+  <!--                                                    -->
+  <!-- <directiveindex>                                   -->
+  <!-- Builds the directive index page                    -->
+  <!--                                                    -->
+  <xsl:template match="quickreference">
+    <html xml:lang="{$messages/@lang}" lang="{$messages/@lang}">
+      <xsl:call-template name="head"/>
+
+      <body id="directive-index">
+        <xsl:call-template name="top"/>
+
+        <div id="preamble">
+          <h1>
+            <xsl:value-of select="title"/>
+          </h1>
+
+          <xsl:apply-templates select="summary" />
+
+
+        </div>
+
+        <div id="directive-list">
+        <table class="qref">
+        <tr><th><a href="directive-dict.html#Syntax"><xsl:value-of select="$messages/message[@name='syntax']"/></a></th>
+           <th><a href="directive-dict.html#Default"><xsl:value-of select="$messages/message[@name='default']"/></a></th>
+           <th></th><th></th></tr>
+         <xsl:for-each select="document(/*/modulefilelist/modulefile)/modulesynopsis/directivesynopsis[not(@location)]">
+         <xsl:sort select="name"/>
+
+
+            <xsl:variable name="rowpos">
+              <xsl:choose>
+                <xsl:when test="position() mod 2 = 0">
+                  even
+                </xsl:when>
+                <xsl:otherwise>
+                  odd
+                </xsl:otherwise>
+              </xsl:choose>
+           </xsl:variable>
+
+
+             <tr class="{$rowpos}">
+               <td>
+                 <a style="text-decoration: none" 
+                   href="{../name}.html#{translate(name,$uppercase,$lowercase)}">
+                   <xsl:apply-templates select="syntax"/>
+                 </a>
+               </td>
+
+
+               <td>
+                 <xsl:value-of select="substring(substring-after(concat(default,' '),name),1,20)"/>
+                 <xsl:if test="string-length(substring-after(concat(default,' '),name)) &gt; 20">
+                   +
+                 </xsl:if>
+               </td>
+
+               <td>
+                 <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>
+               </td>
+
+              <td>
+               <xsl:if test="contextlist/* = 'server config'">s</xsl:if>
+               <xsl:if test="contextlist/* = 'virtual host'">v</xsl:if>
+               <xsl:if test="contextlist/* = 'directory'">d</xsl:if>
+               <xsl:if test="contextlist/* = '.htaccess'">h</xsl:if>
+              </td>
+
+           </tr>
+
+           <tr class="{$rowpos}">
+             <td>
+               &nbsp;&nbsp;
+               <xsl:apply-templates select="description"/>
+             </td>
+          </tr>            
+          <xsl:text>
+</xsl:text><!-- insert a line break -->
+        </xsl:for-each>
+        </table>
+       </div>
+
+        <xsl:call-template name="bottom"/>
+      </body>
+    </html>
+  </xsl:template> 
+
+
+
+</xsl:stylesheet>