/[gentoo-dk]/gentoo-dk/xsl/herds.xsl
ViewVC logotype

Diff of /gentoo-dk/xsl/herds.xsl

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.1 by broeman, Mon Sep 1 10:50:18 2003 UTC revision 1.2 by mejlholm, Mon Nov 3 20:06:02 2003 UTC
# Line 1  Line 1 
1  <?xml version="1.0" encoding="iso-8859-1"?>  <?xml version="1.0" encoding="iso-8859-1"?>
2  <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">  <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
3  <xsl:output encoding="iso-8859-1" method="xml" indent="yes"/>    <xsl:output encoding="iso-8859-1" method="xml" indent="yes"/>
4      <xsl:param name="select" select="string('all')"/>
5  <xsl:template match="/herds">    <xsl:include href="util.xsl"/>
6          <xsl:processing-instruction name="xml-stylesheet">type="text/xsl" href="/xsl/guide.xsl"</xsl:processing-instruction>    <xsl:template match="/herds">
7          <guide  link="index.xml" type="project">      <xsl:processing-instruction name="xml-stylesheet">type=&quot;text/xsl&quot; href=&quot;/xsl/guide.xsl&quot;</xsl:processing-instruction>
8                  <title>Herds</title>      <guide link="index.xml" type="project">
9                  <author title="script generated">Gentoo Project</author>        <xsl:choose>
10                  <abstract>This is a list of the package maintenance groups under the Gentoo project, and who maintain those packages.</abstract>          <xsl:when test="$select=&quot;all&quot;">
11                  <version>1.0.1</version>            <title>Herds</title>
12                  <date>automatically</date>          </xsl:when>
13                  <chapter>          <xsl:otherwise>
14                          <title>Introduction</title>            <title><xsl:value-of select="$select"/> herd information page</title>
15                          <section>          </xsl:otherwise>
16                          <body>        </xsl:choose>
17                          <p>This is a list of the package maintenance groups under the Gentoo project, and who maintain those packages.</p>        <author title="script generated">Gentoo Project</author>
18                          </body>        <abstract>This is a list of the package maintenance groups under the Gentoo project, and who maintain those packages.</abstract>
19                          </section>        <version>1.0.1</version>
20                  </chapter>        <date>automatically</date>
21                  <xsl:apply-templates select="herd">        <xsl:choose>
22                          <xsl:sort select="name"/>          <xsl:when test="$select=&quot;all&quot;">
23                  </xsl:apply-templates>            <chapter>
24          </guide>              <title>Introduction</title>
25  </xsl:template>              <section>
26                  <body>
27  <xsl:template match="herd">                  <p>This is a list of the package maintenance groups under the Gentoo project, and who maintain those packages.</p>
28          <chapter>                </body>
29          <title><xsl:value-of select="name"/></title>              </section>
30          <section>            </chapter>
31          <title>Description</title>            <xsl:apply-templates select="herd">
32          <body>              <xsl:sort select="name"/>
33          <p>            </xsl:apply-templates>
34          <xsl:apply-templates select="description"/>          </xsl:when>
35          </p>          <xsl:otherwise>
36          </body>            <xsl:for-each select="herd[name/text()=$select][1]">
37          </section>              <chapter>
38          <section>                <title>Herd info</title>
39          <title>Maintainers</title>                <section>
40          <body>                  <title>Name</title>
41          <ul><xsl:apply-templates select="maintainer"><xsl:sort select="email"/></xsl:apply-templates></ul>                  <body>
42          </body>                    <xsl:value-of select="name"/>
43          </section>                  </body>
44          </chapter>                </section>
45  </xsl:template>                <section>
46                    <title>Description</title>
47  <xsl:template match="description">                  <body>
48          <xsl:value-of select="."/>                    <xsl:value-of select="description"/>
49  </xsl:template>                  </body>
50                  </section>
51  <xsl:template match="maintainer">                <xsl:if test="email">
52          <li>                  <section>
53          <xsl:apply-templates select="email"/>                    <title>Herd maintainers' email address</title>
54          <xsl:apply-templates select="name"/>                    <body>
55          <xsl:apply-templates select="role"/>                      <xsl:value-of select="email"/>
56          </li>                    </body>
57  </xsl:template>                  </section>
58                  </xsl:if>
59  <xsl:template match="email">                <section>
60          <xsl:value-of select="."/>                  <title>Maintainers</title>
61  </xsl:template>                  <body>
62                      <ul>
63  <xsl:template match="name">                      <xsl:apply-templates select="maintainer">
64          <xsl:text> </xsl:text>(<xsl:value-of select="."/>)                        <xsl:sort select="email"/>
65  </xsl:template>                      </xsl:apply-templates>
66                      </ul>
67  <xsl:template match="role">                  </body>
68          <xsl:text> - </xsl:text><xsl:value-of select="."/>                </section>
69  </xsl:template>              </chapter>
70                <chapter>
71                  <title>Packages primary managed by this herd</title>
72                  <section>
73                    <body>
74                      <table>
75                        <tr>
76                          <th>Name</th>
77                          <th>maintainer</th>
78                          <th>description</th>
79                        </tr>
80                        <xsl:apply-templates select="document(&quot;/proj/en/metastructure/herds/pkgList.xml&quot;)/packages/pkgmetadata[herd[1]/text()=$select]">
81                          <xsl:sort select="@pkgname"/>
82                        </xsl:apply-templates>
83                      </table>
84                    </body>
85                  </section>
86                </chapter>
87                <xsl:if test="document(&quot;/proj/en/metastructure/herds/pkgList.xml&quot;)/packages/pkgmetadata[herd[2]/text()=$select]">
88                  <chapter>
89                    <title>Packages not primary managed by this herd</title>
90                    <section>
91                      <body>
92                        <table>
93                          <tr>
94                            <th>Name</th>
95                            <th>maintainer</th>
96                            <th>description</th>
97                          </tr>
98                          <xsl:apply-templates select="document(&quot;/proj/en/metastructure/herds/pkgList.xml&quot;)/packages/pkgmetadata[herd[not(position()=1)]/text()=$select]">
99                            <xsl:sort select="@pkgname"/>
100                          </xsl:apply-templates>
101                        </table>
102                      </body>
103                    </section>
104                  </chapter>
105                </xsl:if>
106              </xsl:for-each>
107            </xsl:otherwise>
108          </xsl:choose>
109        </guide>
110      </xsl:template>
111      <xsl:template match="pkgmetadata">
112        <tr>
113          <ti>
114            <xsl:choose>
115              <xsl:when test='document(&quot;/dyn/pkgs/index.xml&quot;)/packages/category[name=substring-before(current()/@pkgname,&quot;/&quot;)]/package[name=substring-after(current()/@pkgname,&quot;/&quot;) ]'>
116                <uri>
117                  <xsl:attribute name="link">/dyn/pkgs/<xsl:value-of select="@pkgname"/>.xml</xsl:attribute>
118                  <xsl:value-of select="@pkgname"/>
119                </uri>
120              </xsl:when>
121              <xsl:otherwise>
122                <xsl:value-of select="@pkgname"/>
123              </xsl:otherwise>
124            </xsl:choose>
125          </ti>
126          <ti>
127            <xsl:value-of select="substring-before(maintainer[1]/email,&quot;@gentoo.org&quot;)"/>
128            <xsl:text> </xsl:text>
129            <xsl:call-template name="fullname">
130              <xsl:with-param name="nick" select="substring-before(maintainer[1]/email,&quot;@gentoo.org&quot;)"/>
131              <xsl:with-param name="parent" select="&quot;true&quot;"/>
132            </xsl:call-template>
133          </ti>
134          <ti>
135            <xsl:value-of select="longdescription"/>
136          </ti>
137        </tr>
138      </xsl:template>
139      <xsl:template match="herd">
140        <chapter>
141          <title>
142            <xsl:value-of select="name"/>
143          </title>
144          <section>
145            <title>Description</title>
146            <body>
147              <p>
148                <xsl:apply-templates select="description"/>
149              </p>
150            </body>
151          </section>
152          <xsl:if test="email">
153            <section>
154              <title>Herd maintainers' email address</title>
155              <body>
156                <p>
157                  <xsl:value-of select="email"/>
158                </p>
159              </body>
160            </section>
161          </xsl:if>
162          <section>
163            <title>Maintainers</title>
164            <body>
165              <ul>
166                <xsl:apply-templates select="maintainer">
167                  <xsl:sort select="email"/>
168                </xsl:apply-templates>
169              </ul>
170            </body>
171          </section>
172          <section>
173            <title>Info</title>
174            <body>
175              More info on the <xsl:value-of select="name"/> herd can be found
176              <uri><xsl:attribute name="link">?select=<xsl:value-of select="name"/></xsl:attribute>
177                here
178              </uri>
179            </body>
180          </section>
181        </chapter>
182      </xsl:template>
183      <xsl:template match="description">
184        <xsl:value-of select="."/>
185      </xsl:template>
186      <xsl:template match="maintainer">
187        <li>
188          <xsl:apply-templates select="email"/>
189          <xsl:text> </xsl:text>
190          <xsl:call-template name="fullname">
191            <xsl:with-param name="nick" select="substring-before(email,&quot;@&quot;)"/>
192            <xsl:with-param name="parent" select="&quot;true&quot;"/>
193          </xsl:call-template>
194          <xsl:apply-templates select="role"/>
195        </li>
196      </xsl:template>
197      <xsl:template match="email">
198        <xsl:value-of select="text()"/>
199      </xsl:template>
200      <xsl:template match="name">
201        <xsl:text> </xsl:text>(<xsl:value-of select="text()"/>)
202      </xsl:template>
203      <xsl:template match="role">
204        <xsl:text> - </xsl:text>
205        <xsl:value-of select="text()"/>
206      </xsl:template>
207  </xsl:stylesheet>  </xsl:stylesheet>

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26