source: stylesheets/md5sum.xsl@ 0d80918a

12.1 12.1-rc1 12.2 12.2-rc1 multilib trunk xry111/arm64 xry111/clfs-ng xry111/loongarch xry111/loongarch-12.1 xry111/loongarch-12.2 xry111/mips64el xry111/multilib xry111/update-glibc
Last change on this file since 0d80918a was 2a26a4f5, checked in by Pierre Labastie <pierre.labastie@…>, 8 months ago

Remove all &#xxx; occurences

  • replace some characters by their utf-8 encoded equivalent (and change encoding in the <?xml?> line
  • replace &#xa; with a true newline char. This is somewhat more readable anyway.
  • Property mode set to 100644
File size: 1.6 KB
Line 
1<?xml version='1.0' encoding='UTF-8'?>
2
3<!-- Create a md5 list for packages and patches used. -->
4
5<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
6 version="1.0">
7
8 <xsl:output method="text"/>
9
10 <xsl:template match="/">
11 <xsl:apply-templates select="//ulink"/>
12 </xsl:template>
13
14 <xsl:template match="ulink">
15 <!-- If some package don't have the predefined strings in their
16 name, the next test must be fixed to match it also. Skip possible
17 duplicated URLs that may be split for PDF output -->
18 <xsl:if test="(contains( @url, '.tar.' ) or
19 contains( @url, '.tgz' ) or
20 contains( @url, '.patch') ) and
21 not( ancestor-or-self::*/@condition = 'pdf' )" >
22 <!-- Get the md5sum -->
23 <xsl:value-of select="../../para/literal"/>
24
25 <!-- Add two spaces -->
26 <xsl:text> </xsl:text>
27
28 <!-- Get the basename -->
29 <xsl:call-template name="basename">
30 <xsl:with-param name="pathname" select="@url"/>
31 </xsl:call-template>
32
33 <!-- Add a newline -->
34 <xsl:text>
35</xsl:text>
36
37 </xsl:if>
38 </xsl:template>
39
40 <xsl:template name="basename">
41 <xsl:param name="pathname"/>
42
43 <xsl:choose>
44
45 <xsl:when test="contains( $pathname, '/' )" >
46 <xsl:call-template name="basename">
47 <xsl:with-param name="pathname" select="substring-after( $pathname, '/' )" />
48 </xsl:call-template>
49 </xsl:when>
50
51 <xsl:otherwise>
52 <xsl:value-of select="$pathname"/>
53 </xsl:otherwise>
54
55 </xsl:choose>
56 </xsl:template>
57
58</xsl:stylesheet>
Note: See TracBrowser for help on using the repository browser.