/[qa]/trunk/pts/www/xsl/pts.xsl
ViewVC logotype

Contents of /trunk/pts/www/xsl/pts.xsl

Parent Directory Parent Directory | Revision Log Revision Log


Revision 350 - (hide annotations) (download) (as text)
Tue Aug 13 07:33:45 2002 UTC (10 years, 10 months ago) by hertzog
File MIME type: application/xml
File size: 15314 byte(s)
* Added a meta tag for the robots (don't follow links).
1 hertzog 347 <?xml version="1.0" encoding="ISO-8859-1" ?>
2     <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
3    
4     <xsl:output encoding="ISO-8859-1" method="html"/>
5    
6     <xsl:param name="package"/>
7     <xsl:param name="dir"/>
8     <xsl:param name="date"/>
9     <xsl:param name="hasstable" select="''"/>
10     <xsl:param name="hastesting" select="''"/>
11     <xsl:param name="hasunstable" select="''"/>
12     <xsl:param name="hasexperimental" select="''"/>
13     <xsl:param name="hasother" select="''"/>
14    
15     <xsl:variable name="exc" select="document('../base/update_excuses.xml')/excuses"/>
16     <xsl:variable name="other" select="document(concat('../base/', $dir, '/other.xml'))/other"/>
17    
18     <!-- Those variables controls the todo and problem item concerning
19     standards-version not being up to date -->
20     <xsl:variable name="lastsv" select="'3.5.6'"/>
21     <xsl:variable name="lastmajorsv" select="'3.'"/>
22     <!-- More variables -->
23     <xsl:variable name="ptsurl" select="'http://pts.debian.net'"/>
24    
25     <!-- Named templates aka functions -->
26     <xsl:template name="mirror">
27     <xsl:choose>
28     <xsl:when test="contains(source/section, 'non-US')">
29     <xsl:text>http://non-us.debian.org/debian-non-US</xsl:text>
30     </xsl:when>
31     <xsl:otherwise>
32     <xsl:text>http://http.us.debian.org/debian</xsl:text>
33     </xsl:otherwise>
34     </xsl:choose>
35     </xsl:template>
36    
37     <xsl:template name="outputitem">
38     <xsl:choose>
39     <xsl:when test="@url">
40     <li><xsl:if test="@date">
41     <xsl:text>[</xsl:text>
42     <xsl:value-of select="@date"/>
43     <xsl:text>] </xsl:text>
44     </xsl:if><a href="{@url}"><xsl:value-of select="text()"/></a></li>
45     </xsl:when>
46     <xsl:otherwise>
47     <li><xsl:if test="@date">
48     <xsl:text>[</xsl:text>
49     <xsl:value-of select="@date"/>
50     <xsl:text>] </xsl:text>
51     </xsl:if><xsl:value-of select="text()"/></li>
52     </xsl:otherwise>
53     </xsl:choose>
54     </xsl:template>
55    
56     <!-- All the work is done in a single template -->
57     <xsl:template match="source">
58    
59     <!-- Start of html -->
60     <html>
61     <head>
62 hertzog 350 <meta name="ROBOTS" content="NOFOLLOW"/>
63 hertzog 347 <link rel="stylesheet" href="../common/pts.css"/>
64     <title>Overview of <xsl:value-of select="$package"/> source package</title>
65     </head>
66     <body>
67     <h1>Overview of <xsl:value-of select="$package"/> source package</h1>
68     <table class="containertable">
69     <tr class="containerrow" valign="top">
70     <td class="containercell">
71     <!-- LEFT SIDE -->
72     <table class="lefttable">
73     <tr class="titlerow">
74     <td class="titlecell" colspan="2">
75     General Information
76     </td></tr>
77     <tr class="normalrow">
78     <td class="labelcell">Last version</td>
79     <td class="contentcell"><xsl:value-of select="version"/></td>
80     </tr>
81     <xsl:if test="@release!='unstable'">
82     <tr class="normalrow">
83     <td class="labelcell">Distribution</td>
84     <td class="contentcell"><xsl:value-of select="@release"/></td>
85     </tr>
86     </xsl:if>
87     <tr class="normalrow">
88     <td class="labelcell">Maintainer</td>
89     <td class="contentcell"><a class="email" href="mailto:{maintainer/email}">
90     <xsl:value-of select="maintainer/name"/></a></td>
91     </tr>
92     <tr class="normalrow">
93     <td class="labelcell">Co-Maintainers</td>
94     <td class="contentcell">
95     <xsl:if test="uploaders">
96     <xsl:for-each select="uploaders/item">
97     <a class="email" href="mailto:{email}"><xsl:value-of select="name"/></a><br/>
98     </xsl:for-each>
99     </xsl:if>
100     <xsl:if test="not(uploaders)">
101     <a class="none" title="You should find some co-maintainers ..." name="fake">None</a>
102     </xsl:if>
103     </td></tr>
104     <tr class="normalrow">
105     <td class="labelcell">Standards-Version</td>
106     <td class="contentcell"><xsl:value-of select="standards-version"/></td>
107     </tr>
108    
109     <tr class="titlerow">
110     <td class="titlecell" colspan="2">
111     Bugs Count
112     </td></tr>
113     <tr class="normalrow">
114     <td class="labelcell">All bugs</td>
115     <td class="contentcell">
116     <a href="http://bugs.debian.org/src:{$package}"><xsl:if test="$hasother">
117     <xsl:value-of select="$other/bugs/@all"/>
118     </xsl:if></a>
119     </td>
120     </tr>
121     <tr class="normalrow">
122     <td class="labelcell">Release Critical</td>
123     <td class="contentcell">
124     <a href="http://bugs.debian.org/cgi-bin/pkgreport.cgi?which=src&amp;data={$package}&amp;archive=no&amp;pend-exc=pending-fixed&amp;pend-exc=fixed&amp;pend-exc=done&amp;sev-inc=critical&amp;sev-inc=grave&amp;sev-inc=serious"><xsl:if test="$hasother">
125     <xsl:value-of select="$other/bugs/@rc"/>
126     </xsl:if></a>
127     </td>
128     </tr>
129     <tr class="normalrow">
130     <td class="labelcell">Important and Normal</td>
131     <td class="contentcell">
132     <a href="http://bugs.debian.org/cgi-bin/pkgreport.cgi?which=src&amp;data={$package}&amp;archive=no&amp;pend-exc=pending-fixed&amp;pend-exc=fixed&amp;pend-exc=done&amp;sev-inc=important&amp;sev-inc=normal"><xsl:if test="$hasother">
133     <xsl:value-of select="$other/bugs/@normal"/>
134     </xsl:if></a>
135     </td>
136     </tr>
137     <tr class="normalrow">
138     <td class="labelcell">Minor and Wishlist</td>
139     <td class="contentcell">
140     <a href="http://bugs.debian.org/cgi-bin/pkgreport.cgi?which=src&amp;data={$package}&amp;archive=no&amp;pend-exc=pending-fixed&amp;pend-exc=fixed&amp;pend-exc=done&amp;sev-inc=minor&amp;sev-inc=wishlist"><xsl:if test="$hasother">
141     <xsl:value-of select="$other/bugs/@wishlist"/>
142     </xsl:if></a>
143     </td>
144     </tr>
145     <tr class="normalrow">
146     <td class="labelcell">Fixed and Pending</td>
147     <td class="contentcell">
148     <a href="http://bugs.debian.org/cgi-bin/pkgreport.cgi?which=src&amp;data={$package}&amp;archive=no&amp;pend-inc=pending-fixed&amp;pend-inc=fixed"><xsl:if test="$hasother">
149     <xsl:value-of select="$other/bugs/@fixed"/>
150     </xsl:if></a>
151     </td>
152     </tr>
153    
154     <tr class="titlerow">
155     <td class="titlecell" colspan="2">
156     Subcription - <a class="titlelink" href="http://www.debian.org/doc/manuals/developers-reference/ch-resources.en.html#s-pkg-tracking-system">Package Tracking System</a>
157     </td></tr>
158     <tr class="normalrow">
159     <td class="labelcell">Subscribers count</td>
160     <td class="contentcell"><xsl:if test="$hasother">
161     <xsl:value-of select="$other/pts/@count"/>
162     </xsl:if></td>
163     </tr>
164     <tr class="normalrow">
165     <td class="contentcell" colspan="2">
166     <form method="post" action="{$ptsurl}/common/pts.cgi">
167     <input type="hidden" name="package" value="{$package}"/>
168     <select name="what">
169     <option value="subscribe">Subscribe</option>
170     <option value="unsubscribe">Unsubscribe</option>
171     <option value="advanced">Advanced mode</option>
172     </select>
173     <input type="text" name="email" size="15" value="your email" onFocus="if(email.value=='your email'){{email.value=''}}"/>
174     <input type="submit" name="submit" value="Send"/>
175     </form>
176     </td>
177     </tr>
178    
179     <tr class="titlerow">
180     <td class="titlecell" colspan="2">
181     Binary Package(s)
182     </td></tr>
183     <tr class="normalrow">
184     <td class="normalcell" colspan="2" style="text-align: left">
185     <xsl:for-each select="binary/item">
186     <xsl:sort select="text()"/>
187     <xsl:variable name="pkg" select="text()"/>
188     <li>
189     <a href="http://packages.debian.org/{text()}"><xsl:value-of select="text()"/></a>
190     <span style="font-size: 70%">
191     (<a href="http://bugs.debian.org/{text()}"><xsl:value-of select="$other/bugs/item[@name=$pkg]/@all"/> bugs</a>:
192     <a title="critical, grave and serious" href="http://bugs.debian.org/cgi-bin/pkgreport.cgi?which=pkg&amp;data={text()}&amp;archive=no&amp;pend-exc=pending-fixed&amp;pend-exc=fixed&amp;pend-exc=done&amp;sev-inc=critical&amp;sev-inc=grave&amp;sev-inc=serious"><xsl:value-of select="$other/bugs/item[@name=$pkg]/@rc"/></a>,
193     <a title="important and normal" href="http://bugs.debian.org/cgi-bin/pkgreport.cgi?which=pkg&amp;data={text()}&amp;archive=no&amp;pend-exc=pending-fixed&amp;pend-exc=fixed&amp;pend-exc=done&amp;sev-inc=important&amp;sev-inc=normal"><xsl:value-of select="$other/bugs/item[@name=$pkg]/@normal"/></a>,
194     <a title="wishlist and minor" href="http://bugs.debian.org/cgi-bin/pkgreport.cgi?which=pkg&amp;data={text()}&amp;archive=no&amp;pend-exc=pending-fixed&amp;pend-exc=fixed&amp;pend-exc=done&amp;sev-inc=minor&amp;sev-inc=wishlist"><xsl:value-of select="$other/bugs/item[@name=$pkg]/@wishlist"/></a>,
195     <a title="pending and fixed" href="http://bugs.debian.org/cgi-bin/pkgreport.cgi?which=pkg&amp;data={text()}&amp;archive=no&amp;pend-inc=pending-fixed&amp;pend-inc=fixed"><xsl:value-of select="$other/bugs/item[@name=$pkg]/@fixed"/></a>)
196     </span>
197     </li>
198     </xsl:for-each>
199     </td></tr>
200    
201     <tr class="titlerow">
202     <td class="titlecell" colspan="2">
203     Other available versions
204     </td></tr>
205     <xsl:if test="$hasexperimental">
206     <tr class="normalrow">
207     <td class="labelcell">Experimental</td>
208     <td class="contentcell">
209     <xsl:value-of select="document(concat('../base/', $dir, '/experimental.xml'))/source/version"/>
210     </td>
211     </tr>
212     </xsl:if>
213     <xsl:if test="$hastesting">
214     <tr class="normalrow">
215     <td class="labelcell">Testing</td>
216     <td class="contentcell">
217     <xsl:value-of select="document(concat('../base/', $dir, '/testing.xml'))/source/version"/>
218     </td>
219     </tr>
220     </xsl:if>
221     <xsl:if test="$hasstable">
222     <tr class="normalrow">
223     <td class="labelcell">Stable</td>
224     <td class="contentcell">
225     <xsl:value-of select="document(concat('../base/', $dir, '/stable.xml'))/source/version"/>
226     </td>
227     </tr>
228     </xsl:if>
229    
230     <tr class="titlerow">
231     <td class="titlecell" colspan="2">
232     Other links
233     </td></tr>
234     <tr>
235     <td class="contentcell" colspan="2" style="text-align: left">
236     <xsl:if test="architecture!='all'">
237     <li><a href="http://buildd.debian.org/build.php?pkg={$package}">Buildd logs</a></li>
238     </xsl:if>
239     <xsl:if test="$hasunstable">
240     <li><a href="http://qa.debian.org/debcheck.php?dist=unstable&amp;package={$package}">Debcheck on unstable</a></li>
241     </xsl:if>
242     <xsl:if test="$hastesting">
243     <li><a href="http://qa.debian.org/debcheck.php?dist=testing&amp;package={$package}">Debcheck on testing</a></li>
244     </xsl:if>
245     <xsl:if test="$hasstable">
246     <li><a href="http://qa.debian.org/debcheck.php?dist=stable&amp;package={$package}">Debcheck on stable</a></li>
247     </xsl:if>
248     </td>
249     </tr>
250    
251     <tr class="titlerow">
252     <td class="titlecell" colspan="2">
253     <xsl:element name="a">
254     <xsl:attribute name="class">
255     <xsl:text>titlelink</xsl:text>
256     </xsl:attribute>
257     <xsl:attribute name="href">
258     <xsl:call-template name="mirror"/>
259     <xsl:text>/</xsl:text>
260     <xsl:value-of select="directory"/>
261     <xsl:text>/</xsl:text>
262     </xsl:attribute>
263     <xsl:text>Source files</xsl:text>
264     </xsl:element>
265     </td></tr>
266     <tr class="normalrow">
267     <td class="normalcell" colspan="2" style="text-align: left">
268     <xsl:for-each select="files/item">
269     <li>
270     <xsl:element name="a">
271     <xsl:attribute name="class">srcfile</xsl:attribute>
272     <xsl:attribute name="href">
273     <xsl:call-template name="mirror"/>
274     <xsl:text>/</xsl:text>
275     <xsl:value-of select="../../directory"/>
276     <xsl:text>/</xsl:text>
277     <xsl:value-of select="filename"/>
278     </xsl:attribute>
279     <xsl:attribute name="title">
280     <xsl:value-of select="size"/>
281     <xsl:text> bytes</xsl:text>
282     </xsl:attribute>
283     <xsl:value-of select="filename"/>
284     </xsl:element>
285     </li>
286     </xsl:for-each>
287     </td></tr>
288    
289     </table>
290     <!-- END LEFT SIDE -->
291     </td><td class="containercell">
292     <!-- RIGHT SIDE -->
293     <table class="righttable">
294    
295    
296     <!-- Todo list -->
297     <xsl:variable name="todo">
298     <xsl:if test="@nmu">
299     <li>Incorporate and acknowledge the changes from the non maintainer upload.</li>
300     </xsl:if>
301     <xsl:if test="not(uploaders)and(priority='standard' or priority='required' or priority='important')">
302     <li>The package is of priority standard or higher, you should really find some co-maintainers.</li>
303     </xsl:if>
304     <xsl:if test="not(starts-with(standards-version, $lastsv))">
305     <li>You should update the package to follow the last version of
306     Debian Policy (Standards-Version
307     <xsl:value-of select="$lastsv"/> instead of
308     <xsl:value-of select="standards-version"/>).</li>
309     </xsl:if>
310     <xsl:if test="$hasother">
311     <xsl:for-each select="$other/todo/item">
312     <xsl:call-template name="outputitem"/>
313     </xsl:for-each>
314     </xsl:if>
315     </xsl:variable>
316     <xsl:if test="count($todo)>0">
317     <tr class="titlerow">
318     <td class="titlecell">
319     Todo
320     </td></tr>
321     <tr class="normalrow">
322     <td class="contentcell2"><xsl:copy-of select="$todo"/>
323     </td>
324     </tr>
325     </xsl:if>
326    
327     <!-- List of problems -->
328     <xsl:variable name="problems">
329     <xsl:if test="$exc/excuse[@name=$package]/@problematic">
330     <li>The package has not yet entered <a
331     href="http://ftp-master.debian.org/testing/update_excuses.html#{$package}">testing</a>
332     even if the <xsl:value-of select="$exc/excuse[@name=$package]/@limit"/>-day
333     delay is over.</li>
334     </xsl:if>
335     <xsl:if test="not(starts-with(standards-version, $lastmajorsv))">
336     <li>The package is severly out of date with respect to the Debian
337     Policy. Latest version is <xsl:value-of select="$lastsv"/>
338     and your package only follows
339     <xsl:value-of select="standards-version"/>...</li>
340     </xsl:if>
341     <xsl:if test="$hasother">
342     <xsl:for-each select="$other/problems/item">
343     <xsl:call-template name="outputitem"/>
344     </xsl:for-each>
345     </xsl:if>
346     </xsl:variable>
347     <xsl:if test="count($problems)>0">
348     <tr class="titlerow">
349     <td class="titlecell">
350     Problems
351     </td></tr>
352     <tr class="normalrow">
353     <td class="contentcell2"><xsl:copy-of select="$problems"/>
354     </td>
355     </tr>
356     </xsl:if>
357    
358     <xsl:if test="$exc/excuse[@name=$package]">
359     <tr class="titlerow">
360     <td class="titlecell">
361     Testing Status
362     </td></tr>
363     <tr class="normalrow">
364     <td class="contentcell2" style="text-align: left">
365     <xsl:for-each select="$exc/excuse[@name=$package]/item">
366     <xsl:call-template name="outputitem"/>
367     </xsl:for-each>
368     </td>
369     </tr>
370     </xsl:if>
371    
372    
373     <xsl:variable name="static">
374     <xsl:if test="$hasother">
375     <xsl:for-each select="$other/static/item">
376     <xsl:call-template name="outputitem"/>
377     </xsl:for-each>
378     </xsl:if>
379     </xsl:variable>
380     <xsl:if test="count($static)>0">
381     <tr class="titlerow">
382     <td class="titlecell">
383     Static Information
384     </td></tr>
385     <tr class="normalrow">
386     <td class="contentcell2"><xsl:copy-of select="$static"/></td>
387     </tr>
388     </xsl:if>
389    
390     <xsl:variable name="news">
391     <xsl:if test="$hasother">
392     <xsl:for-each select="$other/news/item">
393     <xsl:call-template name="outputitem"/>
394     </xsl:for-each>
395     </xsl:if>
396     </xsl:variable>
397     <xsl:if test="count($news)>0">
398     <tr class="titlerow">
399     <td class="titlecell">
400     Latest News
401     </td></tr>
402     <tr class="normalrow">
403     <td class="contentcell2"><xsl:copy-of select="$news"/></td>
404     </tr>
405     </xsl:if>
406    
407     <xsl:variable name="auto">
408     <xsl:if test="$hasother">
409     <xsl:for-each select="$other/auto/item">
410     <xsl:call-template name="outputitem"/>
411     </xsl:for-each>
412     </xsl:if>
413     </xsl:variable>
414     <xsl:if test="count($auto)>0">
415     <tr class="titlerow">
416     <td class="titlecell">
417     Automatic News
418     </td></tr>
419     <tr class="normalrow">
420     <td class="contentcell2"><xsl:copy-of select="$auto"/></td>
421     </tr>
422     </xsl:if>
423    
424    
425     </table>
426     <!-- END RIGHT SIDE -->
427     </td></tr>
428     </table>
429     <hr/>
430     Debian Package Tracking System - Copyright 2002 RaphaĆ«l Hertzog<br/>
431     Last modified : <xsl:value-of select="$date"/>
432     </body>
433     </html>
434     </xsl:template>
435    
436     </xsl:stylesheet>

Properties

Name Value
svn:eol-style native
svn:keywords Author Date Id Revision

  ViewVC Help
Powered by ViewVC 1.1.5