r3591 - jhalfs/branches/ablfs/BLFS/xsl

pierre at linuxfromscratch.org pierre at linuxfromscratch.org
Mon Mar 5 09:33:16 PST 2012


Author: pierre
Date: 2012-03-05 10:33:11 -0700 (Mon, 05 Mar 2012)
New Revision: 3591

Modified:
   jhalfs/branches/ablfs/BLFS/xsl/bump.xsl
Log:
Add a "version" parameter to bump.xsl

Modified: jhalfs/branches/ablfs/BLFS/xsl/bump.xsl
===================================================================
--- jhalfs/branches/ablfs/BLFS/xsl/bump.xsl	2012-03-05 17:23:09 UTC (rev 3590)
+++ jhalfs/branches/ablfs/BLFS/xsl/bump.xsl	2012-03-05 17:33:11 UTC (rev 3591)
@@ -7,7 +7,20 @@
 
   <xsl:param name="packages" select="'packages.xml'"/>
   <xsl:param name="package" select="''"/>
+  <xsl:param name="version" select="'N'"/>
 
+  <xsl:variable name="vers">
+    <xsl:choose>
+      <xsl:when test="$version='N'">
+        <xsl:value-of select=
+            "document($packages)//package[string(name)=$package]/version"/>
+      </xsl:when>
+      <xsl:otherwise>
+        <xsl:value-of select="$version"/>
+      </xsl:otherwise>
+    </xsl:choose>
+  </xsl:variable>
+
   <xsl:output
     method="xml"
     encoding="ISO-8859-1"
@@ -20,9 +33,7 @@
       <xsl:if test="not(.//package[string(name)=$package])">
         <package>
           <name><xsl:value-of select="$package"/></name>
-          <version><xsl:value-of select=
-            "document($packages)//package[string(name)=$package]/version"/>
-          </version>
+          <version><xsl:value-of select="$vers"/></version>
         </package>
       </xsl:if>
     </sublist>
@@ -33,9 +44,7 @@
       <xsl:when test="string(name)=$package">
         <package>
           <name><xsl:value-of select="name"/></name>
-          <version><xsl:value-of select=
-            "document($packages)//package[string(name)=$package]/version"/>
-          </version>
+          <version><xsl:value-of select="$vers"/></version>
         </package>
       </xsl:when>
       <xsl:otherwise>




More information about the alfs-log mailing list