source: BOOK/stylesheets/wget.xsl@ d0d23c9

clfs-1.2 clfs-2.1 clfs-3.0.0-systemd clfs-3.0.0-sysvinit systemd sysvinit
Last change on this file since d0d23c9 was 3f8be484, checked in by Jim Gifford <clfs@…>, 19 years ago

r627@server (orig r625): jim | 2005-10-31 12:59:34 -0800
Import of Cross-LFS Book

  • 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. -->
28 <xsl:if test="contains(@url, '.tar.')">
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-->
34 <xsl:if test="contains(@url, '.patch') and contains(@url, '&patches-root;')
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.