cvs commit: LFS/BOOK/stylesheets patcheslist.xsl

manuel at linuxfromscratch.org manuel at linuxfromscratch.org
Mon May 31 13:15:52 PDT 2004


manuel      04/05/31 14:15:52

  Modified:    BOOK/stylesheets patcheslist.xsl
  Log:
  Modified the patcheslist.xsl stylesheet to ouput a customizable shell script.
  
  Revision  Changes    Path
  1.5       +22 -4     LFS/BOOK/stylesheets/patcheslist.xsl
  
  Index: patcheslist.xsl
  ===================================================================
  RCS file: /home/cvsroot/LFS/BOOK/stylesheets/patcheslist.xsl,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- patcheslist.xsl	19 May 2004 20:16:58 -0000	1.4
  +++ patcheslist.xsl	31 May 2004 20:15:52 -0000	1.5
  @@ -1,20 +1,38 @@
   <?xml version='1.0' encoding='ISO-8859-1'?>
   
  -<!-- This also work again BLFS -->
  +<!-- This work against BLFS also -->
   
   <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                   version="1.0">
   
     <xsl:output method="text"/>
   
  +  <xsl:param name="links.directory">lfs/cvs/unstable/</xsl:param>
  +  <xsl:param name="deep.to.dowloads">../../../</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:apply-templates/>
  +    <xsl:text>&#x0a;  exit</xsl:text>
  +  </xsl:template>
  +
     <xsl:template match="//text()">
       <xsl:text/>
     </xsl:template>
   
     <xsl:template match="//ulink">
  -    <xsl:if test="contains(@url, '.patch')">
  -      <xsl:value-of select="@url"/>
  -      <xsl:text>&#x0a;</xsl:text>
  +    <xsl:if test="contains(@url, '.patch') and contains(@url, 'linuxfromscratch')">
  +      <xsl:text>  ln -s </xsl:text>
  +      <xsl:value-of select="$deep.to.dowloads"/>
  +      <xsl:text>dowloads/</xsl:text>
  +      <xsl:value-of select="substring-before (substring-after(@url, $links.directory), '-')"/>
  +      <xsl:text>/</xsl:text>
  +      <xsl:value-of select="substring-after(@url, $links.directory)"/>
  +      <xsl:text> &&&#x0a;</xsl:text>
       </xsl:if>
     </xsl:template>
   
  
  
  



More information about the lfs-book mailing list