source: BOOK/stylesheets/wget.xsl @ 07323bb

clfs-3.0.0-sysvinitsysvinit
Last change on this file since 07323bb was 07323bb, checked in by Chris Staub <chris@…>, 8 years ago

Updated stylesheet to allow linux kernel patch to be in download list

  • Property mode set to 100644
File size: 1.2 KB
RevLine 
[3f8be484]1<?xml version='1.0' encoding='ISO-8859-1'?>
2<!DOCTYPE xsl:stylesheet [
3 <!ENTITY % general-entities SYSTEM "../general.ent">
4  %general-entities;
5]>
6
7<!--
8XSLT stylesheet to create wget scripts to download packages and patches.
9Only for Cross-LFS.
10
11Usage example:
12
13xsltproc -xinclude -output x86.wget stylesheets/wget.xsl x86-index.xml
14-->
15
16<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
17    version="1.0">
18
19  <xsl:output method="text"/>
20
21  <xsl:template match="/">
22    <xsl:apply-templates select="//ulink"/>
23  </xsl:template>
24
25  <xsl:template match="ulink">
26      <!-- Packages. If some package don't have the string ".tar." in their
27      name, the next test must be fixed to match it also. -->
[b9a02e8]28    <xsl:if test="contains(@url, '.tar.') or contains(@url, '.tgz')">
[3f8be484]29      <xsl:value-of select="@url"/>
30      <xsl:text>&#x0a;</xsl:text>
31    </xsl:if>
32      <!-- Patches. Match only the patches and skip possible duplicated
33      URLs due that may be splitted for PDF output-->
[07323bb]34    <xsl:if test="contains(@url, '&patches-root;') and @url != '&patches-root;'
[3f8be484]35            and not(ancestor-or-self::*/@condition = 'pdf')">
36      <xsl:value-of select="@url"/>
37      <xsl:text>&#x0a;</xsl:text>
38    </xsl:if>
39  </xsl:template>
40
41</xsl:stylesheet>
Note: See TracBrowser for help on using the repository browser.