library-web r520 - in trunk: . data/xslt



Author: fpeters
Date: Wed Oct 15 20:54:29 2008
New Revision: 520
URL: http://svn.gnome.org/viewvc/library-web?rev=520&view=rev

Log:
* data/xslt/indexes.xsl: create a basic page listing nightly generated
documents.  (closes: #556426)



Modified:
   trunk/ChangeLog
   trunk/data/xslt/indexes.xsl

Modified: trunk/data/xslt/indexes.xsl
==============================================================================
--- trunk/data/xslt/indexes.xsl	(original)
+++ trunk/data/xslt/indexes.xsl	Wed Oct 15 20:54:29 2008
@@ -90,9 +90,6 @@
       </xsl:choose>
     </xsl:variable>
 
-    <xsl:message>tocid (<xsl:value-of select="$tocid"/>) is now <xsl:value-of
-    select="$rtocid"/></xsl:message>
-
     <xsl:choose>
       <xsl:when test="document('../externals/toc.xml')//toc[ id = $rtocid]/title">
         <xsl:variable name="cat-icon"
@@ -779,6 +776,40 @@
     </exsl:document>
   </xsl:template>
 
+  <!-- /nightly, listing all nightly generated documents (bug 556426) -->
+  <xsl:template match="document" mode="nightly">
+  </xsl:template>
+
+  <xsl:template match="indexes" mode="nightly">
+    <exsl:document href="nightly.html"
+        method="html" encoding="UTF-8" indent="yes" omit-xml-declaration="yes"
+        doctype-public="-//W3C//DTD HTML 4.01 Transitional//EN"
+        doctype-system="http://www.w3.org/TR/html4/loose.dtd";>
+      <html>
+	<head>
+	  <title>Nightly Documents - GNOME Library</title>
+	  <xsl:call-template name="libgo.head"/>
+          <script type="text/javascript" src="/js/strings.js" />
+	</head>
+	<body class="with-star">
+	  <xsl:call-template name="libgo.header">
+          </xsl:call-template>
+	  <div class="body body-sidebar">
+	  <h1 class="title">Nightly Generated Documents</h1>
+	  <ul>
+	  <xsl:for-each select="index[ lang = 'en']//document">
+	  <xsl:if test="versions/version[ href='nightly'] = 'nightly'">
+	  <li><a href="{ path}  /nightly/"><xsl:value-of select="title"/></a></li>
+	  </xsl:if>
+	  </xsl:for-each>
+	  </ul>
+	  </div>
+	</body>
+      </html>
+    </exsl:document>
+
+  </xsl:template>
+
   <!-- Google sitemap stuff -->
   <xsl:template match="document" mode="sitemap">
     <xsl:if test="@path"> <!-- only local documents -->
@@ -889,6 +920,7 @@
         <xsl:with-param name="lang" select="$lang"/>
       </xsl:apply-templates>
     </xsl:for-each>
+    <xsl:apply-templates select="." mode="nightly"/>
     <xsl:apply-templates select="." mode="sitemap"/>
     <xsl:apply-templates select="." mode="robotstxt"/>
     <xsl:apply-templates select="home" mode="javascript"/>



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]