Index: Makefile
===================================================================
--- Makefile	(revision 9268fb505995d5231c7dad0deb56093dbdfba22f)
+++ Makefile	(revision 7818e780999df24b847035732fc10d5cbb0c765e)
@@ -45,7 +45,4 @@
 	done;
 
-wget-list:
-	mkdir -p $(BASEDIR)
-	xsltproc --xinclude --nonet stylesheets/wget-list.xsl index.xml > $(BASEDIR)/wget-list
 
 nochunks:
@@ -110,3 +107,24 @@
 	rm blfs-patches
 
-.PHONY : blfs-patch-list
+wget-list:
+	mkdir -p $(BASEDIR)
+	xsltproc --xinclude --nonet stylesheets/wget-list.xsl index.xml > $(BASEDIR)/wget-list
+
+test-links:
+	mkdir -p $(BASEDIR)
+	xsltproc --xinclude --nonet --stringparam list_mode full \
+	    stylesheets/wget-list.xsl index.xml > $(BASEDIR)/test-links
+	for URL in `cat $(BASEDIR)/test-links`; do \
+	    wget --spider --tries=2 --timeout=60 $$URL >>/dev/null 2>&1; \
+	    if test $$? -ne 0 ; then echo $$URL >> $(BASEDIR)/bad_urls ; \
+	    else echo $$URL >> $(BASEDIR)/good_urls 2>&1; \
+	    fi; \
+	done
+	for URL2 in `cat $(BASEDIR)/bad_urls`; do \
+	    wget --spider --tries=2 --timeout=60 $$URL2 >>/dev/null 2>&1; \
+	    if test $$? -ne 0 ; then echo $$URL2 >> $(BASEDIR)/true_bad_urls ; \
+	    else echo $$URL2 >> $(BASEDIR)/good_urls 2>&1; \
+	    fi; \
+	done
+
+.PHONY : blfs-patch-list wget-list test-links
Index: stylesheets/wget-list.xsl
===================================================================
--- stylesheets/wget-list.xsl	(revision 9268fb505995d5231c7dad0deb56093dbdfba22f)
+++ stylesheets/wget-list.xsl	(revision 7818e780999df24b847035732fc10d5cbb0c765e)
@@ -14,6 +14,19 @@
   <xsl:output method="text"/>
 
+  <!-- Define the generated wget file type:
+       ftpmirror - the one used to check FTP mirrors (default)
+       full - the one used to test all download links found in the book
+  -->
+  <xsl:param name="list_mode" select="ftpmirror"/>
+
   <xsl:template match="/">
-    <xsl:apply-templates select="//itemizedlist"/>
+    <xsl:choose>
+      <xsl:when test="$list_mode = 'full'">
+       <xsl:apply-templates select="//ulink" mode="full"/>
+      </xsl:when>
+      <xsl:otherwise>
+        <xsl:apply-templates select="//itemizedlist"/>
+      </xsl:otherwise>
+    </xsl:choose>
   </xsl:template>
 
@@ -41,10 +54,12 @@
 
   <xsl:template match="listitem/para/ulink">
-      <!-- If some package don't have the predefined strings in their
-      name, the next test must be fixed to match it also. Skip possible
-      duplicated URLs due that may be splitted for PDF output -->
-    <xsl:if test="(contains(@url, '.tar.') or contains(@url, '.tgz')
-                  or contains(@url, '.zip') or contains(@url, '.patch')) and
-                  not(ancestor-or-self::*/@condition = 'pdf')">
+      <!-- The next strings need be revised periodically to add missing
+      files or to skip false positives. Skip also possible
+      duplicated URLs that may be splitted for PDF output -->
+    <xsl:if test="(contains(@url, '.gz') or contains(@url, '.bz2')
+                  or contains(@url, '.tgz') or contains(@url, '.tar')
+                  or contains(@url, 'patch.txt') or contains(@url, '.zip')
+                  or contains(@url, '.patch') or contains(@url, '/patch.'))
+                  and not(ancestor-or-self::*/@condition = 'pdf')">
       <xsl:choose>
         <!-- Fix SourceForge links-->
@@ -60,4 +75,25 @@
   </xsl:template>
 
+  <xsl:template match="ulink" mode="full">
+      <!-- The next strings need be revised periodically to add missing
+      files or to skip false positives. Skip also possible
+      duplicated URLs that may be splitted for PDF output -->
+    <xsl:if test="(contains(@url, '.gz') or contains(@url, '.bz2')
+                  or contains(@url, '.tgz') or contains(@url, '.tar')
+                  or contains(@url, '.txt') or contains(@url, 'compressdoc')
+                  or contains(@url, '.zip') or contains(@url, '.patch')
+                  or contains(@url, '/patch.') or contains(@url, 'md5sums')
+                  or contains(@url, 'mozconfig'))
+                  and not(contains(@url, '?url'))
+                  and not(ancestor-or-self::*/@condition = 'pdf')">
+      <!-- To list all URls, included html files, wiki pages, home pages, and
+      mailto: links, comment-out the above xsl:if and uncomment the next one. -->
+    <!--
+    <xsl:if test="not(ancestor-or-self::*/@condition = 'pdf')">
+    -->
+      <xsl:value-of select="@url"/>
+      <xsl:text>&#x0a;</xsl:text>
+    </xsl:if>
+  </xsl:template>
+
 </xsl:stylesheet>
-
