r2584 - in trunk: BOOK BOOK/stylesheets edguide

bdubbs at linuxfromscratch.org bdubbs at linuxfromscratch.org
Sat Aug 7 14:59:39 PDT 2004


Author: bdubbs
Date: 2004-08-07 15:59:36 -0600 (Sat, 07 Aug 2004)
New Revision: 2584

Modified:
   trunk/BOOK/Makefile
   trunk/BOOK/stylesheets/patcheslist.xsl
   trunk/edguide/edguide.xsl
Log:
Updates to enable creating a list of blfs patches

Modified: trunk/BOOK/Makefile
===================================================================
--- trunk/BOOK/Makefile	2004-08-07 06:03:18 UTC (rev 2583)
+++ trunk/BOOK/Makefile	2004-08-07 21:59:36 UTC (rev 2584)
@@ -1,6 +1,8 @@
 # Makefile for BLFS Book generation.
 # By Tushar Teredesai <tushar at linuxfromscratch.org>
 # 2004-01-31
+# $LastChangedBy$
+# $Date$
 # Adjust these to suit your installation
 OUTPUTDIR = $(HOME)/public_html/blfs-book
 INSTALL = install
@@ -13,21 +15,6 @@
 
 all: blfs
 
-blfs-old: index.xml
-	@if [ -z $(OUTPUTDIR) ]; then \
-		echo "Envar OUTPUTDIR is not set!" ; \
-		exit 1 ; \
-		fi
-	@echo "Generating HTML Version of BLFS Book with $(JADE)..."
-	@echo "  OUTPUTDIR = $(OUTPUTDIR)"
-	@$(INSTALL) -d $(OUTPUTDIR)
-	@cd $(OUTPUTDIR) && $(INSTALL) -d introduction postlfs general \
-		connect basicnet server content x kde gnome xsoft \
-		multimedia pst preface appendices other
-	@cd $(OUTPUTDIR) && $(JADE) -t sgml -D $(DOCBOOK)/html \
-		-d $(SRCDIR)/blfs.dsl $(DOCBOOK)/dtds/decls/xml.dcl \
-		$(SRCDIR)/index.xml
-
 blfs:
 	@if [ -z $(BASEDIR) ]; then \
 		echo "Envar BASEDIR is not set!" ; \
@@ -46,10 +33,8 @@
 	  mkdir -p $(BASEDIR)images; \
 	fi;
 	cp images/*.png $(BASEDIR)/images
-	cd $(BASEDIR); sed -i -e "s at ../stylesheets at stylesheets@" \
-	  index.html 
-	cd $(BASEDIR); sed -i -e "s at ../images at images@g" \
-	  index.html 
+	cd $(BASEDIR); sed -i -e "s at ../stylesheets at stylesheets@" index.html 
+	cd $(BASEDIR); sed -i -e "s at ../images at images@g" index.html 
 	sh goTidy $(BASEDIR)/  
 
 pdf:
@@ -90,3 +75,13 @@
 
 validate:
 	xmllint --noout --nonet --xinclude --postvalid index.xml
+
+blfs-patch-list: 
+	@echo "Generating blfs-patch-list..."
+	xsltproc --xinclude --nonet \
+             --output blfs-patch-list stylesheets/patcheslist.xsl index.xml
+	sed -e "s|^.*/||" blfs-patch-list > blfs-patches
+	sort blfs-patches > blfs-patch-list
+	rm blfs-patches
+
+.PHONY : blfs-patch-list


Property changes on: trunk/BOOK/Makefile
___________________________________________________________________
Name: svn:keywords
   + Date LastChangedBy

Modified: trunk/BOOK/stylesheets/patcheslist.xsl
===================================================================
--- trunk/BOOK/stylesheets/patcheslist.xsl	2004-08-07 06:03:18 UTC (rev 2583)
+++ trunk/BOOK/stylesheets/patcheslist.xsl	2004-08-07 21:59:36 UTC (rev 2584)
@@ -1,57 +1,24 @@
 <?xml version='1.0' encoding='ISO-8859-1'?>
 
-<!-- This work against BLFS also -->
+<!-- Get list of patch files from the BLFS Book -->
+<!-- $LastChangedBy: $ -->
+<!-- $Date: $ -->
 
 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                 version="1.0">
 
   <xsl:output method="text"/>
 
-  <xsl:param name="links.directory">blfs/cvs/</xsl:param>
-  <xsl:param name="deep.to.downloads">../../../</xsl:param>
-
-  <xsl:template match="/">
-    <xsl:text>#! /bin/bash
-
-  cd /home/httpd/www.linuxfromscratch.org/patches/</xsl:text>
-    <xsl:value-of select="$links.directory"/>
-    <xsl:text> &&&#x0a;&#x0a;</xsl:text>
-    <xsl:text>  rm -f *.patch &&&#x0a;&#x0a;</xsl:text>
-    <xsl:apply-templates/>
-    <xsl:text>&#x0a;  chgrp lfswww *.patch &&&#x0a;</xsl:text>
-    <xsl:text>&#x0a;  exit</xsl:text>
-  </xsl:template>
-
+  <!-- No text needed -->
   <xsl:template match="//text()">
     <xsl:text/>
   </xsl:template>
 
+  <!-- Just grab the url from the ulink tags that have .patch in the name -->
   <xsl:template match="//ulink">
     <xsl:if test="contains(@url, '.patch') and contains(@url, 'linuxfromscratch')">
-      <xsl:text>  cp </xsl:text>
-      <xsl:value-of select="$deep.to.downloads"/>
-      <xsl:text>downloads/</xsl:text>
-      <xsl:if test="contains (@url, '-')">
-        <xsl:variable name="cut" select="translate (@url, '0123456789', '2222222222')"/>
-        <xsl:choose>
-          <xsl:when test="contains ($cut, ',')">
-            <xsl:value-of select="substring-before (substring-after($cut, $links.directory), ',2')"/>
-          </xsl:when>
-          <xsl:otherwise>
-            <xsl:choose>
-              <xsl:when test="contains ($cut, '-src-2')">
-                <xsl:value-of select="substring-before (substring-after($cut, $links.directory), '-src-2')"/>
-              </xsl:when>
-              <xsl:otherwise>
-                <xsl:value-of select="substring-before (substring-after($cut, $links.directory), '-2')"/>
-              </xsl:otherwise>
-            </xsl:choose>
-          </xsl:otherwise>
-        </xsl:choose>
-      </xsl:if>
-      <xsl:text>/</xsl:text>
-      <xsl:value-of select="substring-after(@url, $links.directory)"/>
-      <xsl:text> . &&&#x0a;</xsl:text>
+       <xsl:value-of select="@url"/>
+       <xsl:text>&#x0a;</xsl:text>
     </xsl:if>
   </xsl:template>
 


Property changes on: trunk/BOOK/stylesheets/patcheslist.xsl
___________________________________________________________________
Name: svh:keywords
   + Date LastChangedBy

Modified: trunk/edguide/edguide.xsl
===================================================================
--- trunk/edguide/edguide.xsl	2004-08-07 06:03:18 UTC (rev 2583)
+++ trunk/edguide/edguide.xsl	2004-08-07 21:59:36 UTC (rev 2584)
@@ -3,6 +3,9 @@
 <!-- Version 0.9 - Manuel Canales Esparcia <macana at lfs-es.org>
 Based on the original lfs-chunked.xsl created by Matthew Burgess -->
 
+<!-- $LastChangedBy: $ -->
+<!-- $Date: $ -->
+
 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                 xmlns="http://www.w3.org/1999/xhtml"
                 version="1.0">
@@ -12,15 +15,6 @@
   <xsl:param name="chunker.output.encoding" select="'ISO-8859-1'"/>
   <xsl:param name="chunk.section.depth" select="0"/>
   
-  	<!-- Including our others customized templates -->
-  <!-- <xsl:include href="xhtml/lfs-admon.xsl"/>
-  <xsl:include href="xhtml/lfs-index.xsl"/>
-  <xsl:include href="xhtml/lfs-legalnotice.xsl"/>
-  <xsl:include href="xhtml/lfs-mixed.xsl"/> 
-  <xsl:include href="xhtml/lfs-navigational.xsl"/>
-  <xsl:include href="xhtml/lfs-titles.xsl"/>
-  <xsl:include href="xhtml/lfs-toc.xsl"/> -->
-
   	<!-- The CSS Stylesheet -->
   <xsl:param name="html.stylesheet" select="'edguide.css'"/>
 
@@ -40,30 +34,55 @@
     <xsl:call-template name="inline.monoseq"/>
   </xsl:template>
 
-  <xsl:template match="prefaceinfo|chapterinfo">
+    <!-- Handle name and date in info section as a footnote -->
+
+  <xsl:template name="process.footnotes">
+    <xsl:variable name="footnotes" select=".//footnote"/>
+    <xsl:variable name="fcount">
+      <xsl:call-template name="count.footnotes.in.this.chunk">
+        <xsl:with-param name="node" select="."/>
+        <xsl:with-param name="footnotes" select="$footnotes"/>
+      </xsl:call-template>
+    </xsl:variable>
+   
+    <!-- Only bother to do this if there's at least one non-table footnote -->
+    <xsl:if test="$fcount > 0">
+      <div class="footnotes">
+        <br/>
+        <hr width="100" align="left"/>
+        <xsl:call-template name="process.footnotes.in.this.chunk">
+          <xsl:with-param name="node" select="."/>
+          <xsl:with-param name="footnotes" select="$footnotes"/>
+        </xsl:call-template>
+      </div>
+    </xsl:if>
+  
+    <!-- Add this to the footnotes -->
+    <xsl:apply-templates select='prefaceinfo|chapterinfo' mode='attribution'/>
+  </xsl:template>
+
+  <xsl:template match='prefaceinfo|chapterinfo' mode='attribution'>
     <p class='updated'> Last updated by 
-      <xsl:apply-templates select="othername"/>
+      <xsl:apply-templates select="othername" mode='attribution'/>
       on
-      <xsl:apply-templates select="date"/> 
+      <xsl:apply-templates select="date" mode='attribution'/> 
     </p>
   </xsl:template>
 
-  <xsl:template name='othername' match="othername"> 
+  <xsl:template match='othername' mode='attribution'> 
      <xsl:variable name='author'>
           <xsl:value-of select='.'/>
      </xsl:variable>
      <xsl:variable name='nameonly'>
           <xsl:value-of select='substring($author,10)'/>
      </xsl:variable>
-
      <xsl:value-of select="substring-before($nameonly,'$')" />
   </xsl:template> 
 
-  <xsl:template name='date' match="date"> 
+  <xsl:template match='date' mode='attribution'> 
       <xsl:variable name='date'>
          <xsl:value-of select='.'/>
       </xsl:variable>
-  
       <xsl:value-of select="substring($date,7,26)" />
   </xsl:template> 
 


Property changes on: trunk/edguide/edguide.xsl
___________________________________________________________________
Name: svh:keywords
   + Date LastChangedBy




More information about the blfs-book mailing list