r2382 - in jhalfs/branches/experimental: CLFS HLFS

manuel at linuxfromscratch.org manuel at linuxfromscratch.org
Tue Mar 21 12:20:45 PST 2006


Author: manuel
Date: 2006-03-21 13:20:45 -0700 (Tue, 21 Mar 2006)
New Revision: 2382

Modified:
   jhalfs/branches/experimental/CLFS/packageslist.xsl
   jhalfs/branches/experimental/CLFS/patcheslist.xsl
   jhalfs/branches/experimental/HLFS/patcheslist.xsl
Log:
XSL clean-up.

Modified: jhalfs/branches/experimental/CLFS/packageslist.xsl
===================================================================
--- jhalfs/branches/experimental/CLFS/packageslist.xsl	2006-03-21 20:01:36 UTC (rev 2381)
+++ jhalfs/branches/experimental/CLFS/packageslist.xsl	2006-03-21 20:20:45 UTC (rev 2382)
@@ -1,18 +1,8 @@
 <?xml version='1.0' encoding='ISO-8859-1'?>
-<!DOCTYPE xsl:stylesheet [
- <!ENTITY % general-entities SYSTEM "clfs-development/general.ent">
-  %general-entities;
-]>
 
-<!--$Id
-XSLT stylesheet to create wget scripts to download packages and patches.
-Only for Cross-LFS.
+<!--$Id$ -->
+<!-- Get list of packages from the CLFS Book -->
 
-Usage example:
-
-xsltproc -xinclude -output x86.wget stylesheets/wget.xsl x86-index.xml
--->
-
 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
     version="1.0">
 
@@ -24,8 +14,10 @@
 
   <xsl:template match="ulink">
       <!-- Packages. If some package don't have the string ".tar." in their
-      name, the next test must be fixed to match it also. -->
-    <xsl:if test="contains(@url, '.tar.')">
+      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.')
+            and not(ancestor-or-self::*/@condition = 'pdf')">
       <xsl:value-of select="@url"/>
       <xsl:text>&#x0a;</xsl:text>
     </xsl:if>

Modified: jhalfs/branches/experimental/CLFS/patcheslist.xsl
===================================================================
--- jhalfs/branches/experimental/CLFS/patcheslist.xsl	2006-03-21 20:01:36 UTC (rev 2381)
+++ jhalfs/branches/experimental/CLFS/patcheslist.xsl	2006-03-21 20:20:45 UTC (rev 2382)
@@ -1,18 +1,8 @@
 <?xml version='1.0' encoding='ISO-8859-1'?>
-<!DOCTYPE xsl:stylesheet [
- <!ENTITY % general-entities SYSTEM "clfs-development/general.ent">
-  %general-entities;
-]>
 
-<!--$Id
-XSLT stylesheet to create wget scripts to download packages and patches.
-Only for Cross-LFS.
+<!--$Id$ -->
+<!-- Get list of patches from the CLFS Book -->
 
-Usage example:
-
-xsltproc -xinclude -output x86.wget stylesheets/wget.xsl x86-index.xml
--->
-
 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
     version="1.0">
 
@@ -25,7 +15,7 @@
   <xsl:template match="ulink">
       <!-- Patches. Match only the patches and skip possible duplicated
       URLs due that may be splitted for PDF output-->
-    <xsl:if test="contains(@url, '.patch') and contains(@url, '&patches-root;')
+    <xsl:if test="contains(@url, '.patch')
             and not(ancestor-or-self::*/@condition = 'pdf')">
       <xsl:value-of select="@url"/>
       <xsl:text>&#x0a;</xsl:text>

Modified: jhalfs/branches/experimental/HLFS/patcheslist.xsl
===================================================================
--- jhalfs/branches/experimental/HLFS/patcheslist.xsl	2006-03-21 20:01:36 UTC (rev 2381)
+++ jhalfs/branches/experimental/HLFS/patcheslist.xsl	2006-03-21 20:20:45 UTC (rev 2382)
@@ -1,7 +1,7 @@
 <?xml version='1.0' encoding='ISO-8859-1'?>
 
 <!-- $Id$ -->
-<!-- Get list of patch files from the HLFS Book -->
+<!-- Get list of patches from the HLFS Book -->
 
 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                 version="1.0">
@@ -16,10 +16,12 @@
     <xsl:text/>
   </xsl:template>
 
-  <!-- Just grab the url from the patches.xml file -->
+  <!-- Just grab the url from the patches.xml file. Skip possible
+  duplicated URLs due that may be splitted for PDF output -->
   <xsl:template match="//ulink">
-    <xsl:if test="ancestor::varlistentry[@condition=$model]
-            or not(ancestor::varlistentry[@condition])">
+    <xsl:if test="(ancestor::varlistentry[@condition=$model]
+            or not(ancestor::varlistentry[@condition]))
+            and not(ancestor-or-self::*/@condition = 'pdf')">
        <xsl:value-of select="@url"/>
        <xsl:text>&#x0a;</xsl:text>
     </xsl:if>




More information about the alfs-log mailing list