| Last change
 on this file since d1e75ef7 was             bf8c11f, checked in by Jim Gifford <clfs@…>, 20 years ago | 
        
          | 
r627@server (orig r625):  jim | 2005-10-31 12:59:34 -0800Import of Cross-LFS Book
 
 | 
        
          | 
              
Property                 mode
 set to                 100644 | 
        
          | File size:
            1.2 KB | 
      
      
| Line |  | 
|---|
| 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 | <!-- | 
|---|
| 8 | XSLT stylesheet to create wget scripts to download packages and patches. | 
|---|
| 9 | Only for Cross-LFS. | 
|---|
| 10 |  | 
|---|
| 11 | Usage example: | 
|---|
| 12 |  | 
|---|
| 13 | xsltproc -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>
</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>
</xsl:text> | 
|---|
| 38 | </xsl:if> | 
|---|
| 39 | </xsl:template> | 
|---|
| 40 |  | 
|---|
| 41 | </xsl:stylesheet> | 
|---|
       
      
  Note:
 See   
TracBrowser
 for help on using the repository browser.