r3807 - jhalfs/trunk/BLFS/xsl

pierre at higgs.linuxfromscratch.org pierre at higgs.linuxfromscratch.org
Sun Sep 28 01:06:24 PDT 2014


Author: pierre
Date: Sun Sep 28 01:06:23 2014
New Revision: 3807

Log:
Avoid spurious linebreaks
in test commands, because some developpers
include them for formatting the xml

Modified:
   jhalfs/trunk/BLFS/xsl/scripts.xsl

Modified: jhalfs/trunk/BLFS/xsl/scripts.xsl
==============================================================================
--- jhalfs/trunk/BLFS/xsl/scripts.xsl	Wed Sep 24 03:10:53 2014	(r3806)
+++ jhalfs/trunk/BLFS/xsl/scripts.xsl	Sun Sep 28 01:06:23 2014	(r3807)
@@ -420,15 +420,16 @@
   </xsl:template>
 
   <xsl:template match="para/command">
-    <xsl:if test="(contains(string(),'test') or
-            contains(string(),'check'))">
+    <xsl:variable name="ns" select="normalize-space(string())"/>
+    <xsl:if test="(contains($ns,'test') or
+            contains($ns,'check'))">
       <xsl:text>#</xsl:text>
-      <xsl:value-of select="substring-before(string(),'make ')"/>
+      <xsl:value-of select="substring-before($ns,'make ')"/>
       <xsl:text>make </xsl:text>
-      <xsl:if test="not(contains(string(),'-k'))">
+      <xsl:if test="not(contains($ns,'-k'))">
         <xsl:text>-k </xsl:text>
       </xsl:if>
-      <xsl:value-of select="substring-after(string(),'make ')"/>
+      <xsl:value-of select="substring-after($ns,'make ')"/>
       <xsl:text> || true&#xA;</xsl:text>
     </xsl:if>
   </xsl:template>


More information about the alfs-log mailing list