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

Diff of /trunk/pts/www/xsl/pts.xsl

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

revision 909 by jeroen, Mon Jan 31 23:11:23 2005 UTC revision 1087 by djpig, Sat Sep 10 17:14:16 2005 UTC
# Line 13  Line 13 
13  <xsl:param name="package"/>  <xsl:param name="package"/>
14  <xsl:param name="dir"/>  <xsl:param name="dir"/>
15  <xsl:param name="date"/>  <xsl:param name="date"/>
16    <xsl:param name="hasoldstable" select="''"/>
17  <xsl:param name="hasstable" select="''"/>  <xsl:param name="hasstable" select="''"/>
18  <xsl:param name="hastesting" select="''"/>  <xsl:param name="hastesting" select="''"/>
19  <xsl:param name="hasunstable" select="''"/>  <xsl:param name="hasunstable" select="''"/>
# Line 20  Line 21 
21  <xsl:param name="hasother" select="''"/>  <xsl:param name="hasother" select="''"/>
22  <xsl:param name="hass-p-u" select="''"/>  <xsl:param name="hass-p-u" select="''"/>
23  <xsl:param name="hast-p-u" select="''"/>  <xsl:param name="hast-p-u" select="''"/>
24    <xsl:param name="hasoldstable-security" select="''"/>
25  <xsl:param name="hasstable-security" select="''"/>  <xsl:param name="hasstable-security" select="''"/>
26  <xsl:param name="hastesting-security" select="''"/>  <xsl:param name="hastesting-security" select="''"/>
27  <xsl:param name="hasnews" select="''"/>  <xsl:param name="hasnews" select="''"/>
# Line 29  Line 31 
31    
32  <!-- Those variables controls the todo and problem item concerning  <!-- Those variables controls the todo and problem item concerning
33       standards-version not being up to date -->       standards-version not being up to date -->
34  <xsl:variable name="lastsv" select="'3.6.1'"/>  <xsl:variable name="lastsv" select="'3.6.2'"/>
35  <xsl:variable name="lastmajorsv" select="'3.'"/>  <xsl:variable name="lastmajorsv" select="'3.'"/>
36    
37  <!-- Named templates aka functions -->  <!-- Named templates aka functions -->
38  <xsl:template name="mirror">  <xsl:template name="mirror">
39    <xsl:choose>    <xsl:text>http://ftp.debian.org/debian</xsl:text>
     <xsl:when test="contains(/source/section, 'non-US')">  
       <xsl:text>http://non-us.debian.org/debian-non-US</xsl:text>  
     </xsl:when>  
     <xsl:otherwise>  
       <xsl:text>http://http.us.debian.org/debian</xsl:text>  
     </xsl:otherwise>  
   </xsl:choose>  
40  </xsl:template>  </xsl:template>
41    
42  <xsl:template name="outputitem">  <xsl:template name="outputitem">
# Line 51  Line 46 
46          <xsl:text>[</xsl:text>          <xsl:text>[</xsl:text>
47          <xsl:value-of select="@date"/>          <xsl:value-of select="@date"/>
48          <xsl:text>] </xsl:text>          <xsl:text>] </xsl:text>
49        </xsl:if><a href="{@url}"><xsl:value-of select="text()"/></a></li>        </xsl:if><a href="{@url}">
50          <xsl:value-of select="text()"/></a><xsl:if test="@from">
51            <xsl:text> (</xsl:text>
52            <xsl:value-of select="@from"/>
53            <xsl:text>)</xsl:text></xsl:if></li>
54      </xsl:when>      </xsl:when>
55      <xsl:otherwise>      <xsl:otherwise>
56        <li><xsl:if test="@date">        <li><xsl:if test="@date">
# Line 78  Line 77 
77    </xsl:if>    </xsl:if>
78  </xsl:template>  </xsl:template>
79    
80    <!-- Strip epoch -->
81    <xsl:template name="strip-epoch">
82      <xsl:param name="version"/>
83      <xsl:if test="contains($version,':')">
84        <xsl:value-of select="substring-after($version,':')"/>
85      </xsl:if>
86      <xsl:if test="not(contains($version,':'))">
87        <xsl:value-of select="$version"/>
88      </xsl:if>
89    </xsl:template>
90    
91    
92  <!-- All the work is done in a single template -->  <!-- All the work is done in a single template -->
93  <xsl:template match="source">  <xsl:template match="source">
94    
95    <!-- Start of html -->    <!-- Start of html -->
96      <xsl:text disable-output-escaping="yes">
97      &lt;!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"&gt;
98      </xsl:text>
99    <html>    <html>
100    <head>    <head>
101    <meta name="ROBOTS" content="NOFOLLOW"/>    <meta name="ROBOTS" content="NOFOLLOW"/>
# Line 97  Line 110 
110    Jump to package (<a href="/">home page</a>): <br/>    Jump to package (<a href="/">home page</a>): <br/>
111    <input type="text" name="src" value=""/>    <input type="text" name="src" value=""/>
112    </form>    </form>
113    <h1>Overview of <xsl:value-of select="$package"/> source package</h1>    <h1>Overview of
114      <xsl:element name="a">
115        <xsl:attribute name="href">
116          <xsl:text>http://packages.debian.org/src:</xsl:text>
117           <xsl:value-of select="$package"/>
118        </xsl:attribute>
119       <xsl:value-of select="$package"/>
120      </xsl:element>
121      source package</h1>
122    
123    <table class="containertable">    <table class="containertable">
124    <tr class="containerrow" valign="top">    <tr class="containerrow" valign="top">
# Line 280  Line 301 
301    </td></tr>    </td></tr>
302    <tr class="normalrow">    <tr class="normalrow">
303    <td class="normalcell" colspan="2" style="text-align: left">    <td class="normalcell" colspan="2" style="text-align: left">
304      <ul>
305    <xsl:for-each select="binary/item">    <xsl:for-each select="binary/item">
306      <xsl:sort select="text()"/>      <xsl:sort select="text()"/>
307      <xsl:variable name="pkg" select="text()"/>      <xsl:variable name="pkg" select="text()"/>
# Line 338  Line 360 
360      </span>      </span>
361      </li>      </li>
362    </xsl:for-each>    </xsl:for-each>
363    </td></tr>    </ul></td></tr>
364    
365    <tr class="titlerow">    <tr class="titlerow">
366    <td class="titlecell" colspan="2">    <td class="titlecell" colspan="2">
367    Other available versions    Available versions
368    </td></tr>    </td></tr>
369    <xsl:if test="$hasexperimental">  
370      <!-- oldstable -->
371      <xsl:if test="$hasoldstable">
372    <tr class="normalrow">    <tr class="normalrow">
373    <td class="labelcell">Experimental</td>    <td class="labelcell"><a href="http://www.debian.org/releases/woody/">Oldstable</a></td>
374    <td class="contentcell">    <td class="contentcell">
375    <xsl:value-of select="document(concat('../base/', $dir, '/experimental.xml'))/source/version"/>    <xsl:value-of select="document(concat('../base/', $dir, '/oldstable.xml'))/source/version"/>
376      </td>
377      </tr>
378      </xsl:if>
379      <xsl:if test="$hasoldstable-security">
380      <tr class="normalrow">
381      <td class="labelcell"><small>Oldstable Security Updates</small></td>
382      <td class="contentcell">
383      <xsl:value-of select="document(concat('../base/', $dir, '/oldstable-security.xml'))/source/version"/>
384      </td>
385      </tr>
386      </xsl:if>
387    
388      <!-- stable -->
389      <xsl:if test="$hasstable">
390      <tr class="normalrow">
391      <td class="labelcell"><a href="http://www.debian.org/releases/stable/">Stable</a></td>
392      <td class="contentcell">
393      <xsl:value-of select="document(concat('../base/', $dir, '/stable.xml'))/source/version"/>
394    </td>    </td>
395    </tr>    </tr>
396    </xsl:if>    </xsl:if>
397    <xsl:if test="$hasstable-security">    <xsl:if test="$hasstable-security">
398    <tr class="normalrow">    <tr class="normalrow">
399    <td class="labelcell">Security Updates (stable)</td>    <td class="labelcell"><small>Stable Security Updates</small></td>
400    <td class="contentcell">    <td class="contentcell">
401    <xsl:value-of select="document(concat('../base/', $dir, '/stable-security.xml'))/source/version"/>    <xsl:value-of select="document(concat('../base/', $dir, '/stable-security.xml'))/source/version"/>
402    </td>    </td>
403    </tr>    </tr>
404    </xsl:if>    </xsl:if>
405    <xsl:if test="$hastesting-security">    <xsl:if test="$hass-p-u">
406    <tr class="normalrow">    <tr class="normalrow">
407    <td class="labelcell">Security Updates (testing)</td>    <td class="labelcell"><small>Stable Proposed Updates</small></td>
408    <td class="contentcell">    <td class="contentcell">
409    <xsl:value-of select="document(concat('../base/', $dir, '/testing-security.xml'))/source/version"/>    <xsl:value-of select="document(concat('../base/', $dir, '/s-p-u.xml'))/source/version"/>
410    </td>    </td>
411    </tr>    </tr>
412    </xsl:if>    </xsl:if>
413    
414      <!-- testing -->
415    <xsl:if test="$hastesting">    <xsl:if test="$hastesting">
416    <tr class="normalrow">    <tr class="normalrow">
417    <td class="labelcell"><a href="http://www.debian.org/releases/testing/">Testing</a></td>    <td class="labelcell"><a href="http://www.debian.org/releases/testing/">Testing</a></td>
# Line 376  Line 420 
420    </td>    </td>
421    </tr>    </tr>
422    </xsl:if>    </xsl:if>
423      <xsl:if test="$hastesting-security">
424      <tr class="normalrow">
425      <td class="labelcell"><small>Testing Security Updates</small></td>
426      <td class="contentcell">
427      <xsl:value-of select="document(concat('../base/', $dir, '/testing-security.xml'))/source/version"/>
428      </td>
429      </tr>
430      </xsl:if>
431    <xsl:if test="$hast-p-u">    <xsl:if test="$hast-p-u">
432    <tr class="normalrow">    <tr class="normalrow">
433    <td class="labelcell">Testing Proposed Updates</td>    <td class="labelcell"><small>Testing Proposed Updates</small></td>
434    <td class="contentcell">    <td class="contentcell">
435    <xsl:value-of select="document(concat('../base/', $dir, '/t-p-u.xml'))/source/version"/>    <xsl:value-of select="document(concat('../base/', $dir, '/t-p-u.xml'))/source/version"/>
436    </td>    </td>
437    </tr>    </tr>
438    </xsl:if>    </xsl:if>
439    <xsl:if test="$hasstable">  
440      <!-- unstable -->
441      <xsl:if test="$hasunstable">
442    <tr class="normalrow">    <tr class="normalrow">
443    <td class="labelcell"><a href="http://www.debian.org/releases/stable/">Stable</a></td>    <td class="labelcell">Unstable</td>
444    <td class="contentcell">    <td class="contentcell">
445    <xsl:value-of select="document(concat('../base/', $dir, '/stable.xml'))/source/version"/>    <xsl:value-of select="document(concat('../base/', $dir, '/unstable.xml'))/source/version"/>
446    </td>    </td>
447    </tr>    </tr>
448    </xsl:if>    </xsl:if>
449    <xsl:if test="$hass-p-u">  
450      <!-- experimental -->
451      <xsl:if test="$hasexperimental">
452    <tr class="normalrow">    <tr class="normalrow">
453    <td class="labelcell">Stable Proposed Updates</td>    <td class="labelcell">Experimental</td>
454    <td class="contentcell">    <td class="contentcell">
455    <xsl:value-of select="document(concat('../base/', $dir, '/s-p-u.xml'))/source/version"/>    <xsl:value-of select="document(concat('../base/', $dir, '/experimental.xml'))/source/version"/>
456    </td>    </td>
457    </tr>    </tr>
458    </xsl:if>    </xsl:if>
459    
460      <!-- Patches list [FG] -->
461      <xsl:if test="$other/@patches='yes'">
462        <tr class="titlerow">
463        <td class="titlecell" colspan="2">
464        Patches
465        </td></tr>
466        <tr>
467        <td class="contentcell" colspan="2" style="text-align: left">
468        <ul>
469        <xsl:for-each select="$other/patches/item">
470          <li>
471            <a href="{$other/patches/item/@url}">Patch from <xsl:value-of select="$other/patches/item/@distro"/> for version <xsl:value-of select="$other/patches/item/@version"/></a>
472          </li>
473        </xsl:for-each>
474        <xsl:if test="$other/bugs/@patch!='0'">
475          <li>
476            <a href="http://bugs.debian.org/cgi-bin/pkgreport.cgi?which=src&amp;data={$package}&amp;include=patch&amp;exclude=pending">Patches from BTS (<xsl:value-of select="$other/bugs/@patch"/>)</a>
477          </li>
478        </xsl:if>
479        </ul>
480        </td>
481        </tr>
482      </xsl:if>
483    
484    
485    <tr class="titlerow">    <tr class="titlerow">
486    <td class="titlecell" colspan="2">    <td class="titlecell" colspan="2">
487    Other links    Other links
488    </td></tr>    </td></tr>
489    <tr>    <tr>
490    <td class="contentcell" colspan="2" style="text-align: left">    <td class="contentcell" colspan="2" style="text-align: left">
491      <ul>
492      <li>
493        <xsl:element name="a">
494          <xsl:attribute name="href">
495            <xsl:text>http://packages.debian.org/changelogs/</xsl:text>
496            <xsl:value-of select="directory"/>
497            <xsl:text>/</xsl:text>
498            <xsl:call-template name="escape-name">
499              <xsl:with-param name="text"><xsl:value-of select="$package"/></xsl:with-param>
500            </xsl:call-template>
501            <xsl:text>_</xsl:text>
502            <xsl:call-template name="escape-name">
503              <xsl:with-param name="text">
504                <xsl:call-template name="strip-epoch">
505                  <xsl:with-param name="version">
506                    <xsl:value-of select="version"/>
507                  </xsl:with-param>
508                </xsl:call-template>
509              </xsl:with-param>
510            </xsl:call-template>
511            <xsl:text>/changelog</xsl:text>
512          </xsl:attribute>
513          <xsl:text>Changelog</xsl:text>
514        </xsl:element>
515        /
516        <xsl:element name="a">
517          <xsl:attribute name="href">
518            <xsl:text>http://packages.debian.org/changelogs/</xsl:text>
519            <xsl:value-of select="directory"/>
520            <xsl:text>/</xsl:text>
521            <xsl:call-template name="escape-name">
522              <xsl:with-param name="text"><xsl:value-of select="$package"/></xsl:with-param>
523            </xsl:call-template>
524            <xsl:text>_</xsl:text>
525            <xsl:call-template name="escape-name">
526              <xsl:with-param name="text">
527                <xsl:call-template name="strip-epoch">
528                  <xsl:with-param name="version">
529                    <xsl:value-of select="version"/>
530                  </xsl:with-param>
531                </xsl:call-template>
532              </xsl:with-param>
533            </xsl:call-template>
534            <xsl:text>/</xsl:text>
535            <xsl:call-template name="escape-name">
536                    <xsl:with-param name="text"><xsl:value-of select="$package"/></xsl:with-param>
537            </xsl:call-template>
538            <xsl:text>.copyright</xsl:text>
539          </xsl:attribute>
540          <xsl:text>Copyright</xsl:text>
541        </xsl:element>
542      </li>
543    <xsl:if test="architecture!='all'">    <xsl:if test="architecture!='all'">
544      <li>      <li>
545        <xsl:element name="a">        <xsl:element name="a">
# Line 490  Line 623 
623                                <xsl:variable name="pattern" select="concat('àáèéëêòöøîìùñ-/()&#34; ', &quot;'&quot;)"/>                                <xsl:variable name="pattern" select="concat('àáèéëêòöøîìùñ-/()&#34; ', &quot;'&quot;)"/>
624    <xsl:variable name="_name" select="translate(maintainer/name, $pattern, '____________________')"/>    <xsl:variable name="_name" select="translate(maintainer/name, $pattern, '____________________')"/>
625      <li><a href="http://lintian.debian.org/reports/m{$_name}.html#{$package}">Lintian report</a></li>      <li><a href="http://lintian.debian.org/reports/m{$_name}.html#{$package}">Lintian report</a></li>
626      <li>
627        <xsl:element name="a">
628          <xsl:attribute name="href">
629            <xsl:text>http://qa.debian.org/developer.php?popcon=</xsl:text>
630            <xsl:call-template name="escape-name">
631              <xsl:with-param name="text"><xsl:value-of select="$package"/></xsl:with-param>
632            </xsl:call-template>
633          </xsl:attribute>
634          <xsl:text>Popcon stats</xsl:text>
635        </xsl:element>
636      </li>
637      </ul>
638    </td>    </td>
639    </tr>    </tr>
640    
# Line 511  Line 655 
655    </td></tr>    </td></tr>
656    <tr class="normalrow">    <tr class="normalrow">
657    <td class="normalcell" colspan="2" style="text-align: left">    <td class="normalcell" colspan="2" style="text-align: left">
658      <ul>
659    <xsl:for-each select="files/item">    <xsl:for-each select="files/item">
660      <li>      <li>
661      <xsl:element name="a">      <xsl:element name="a">
# Line 530  Line 675 
675      </xsl:element>      </xsl:element>
676      </li>      </li>
677    </xsl:for-each>    </xsl:for-each>
678    </td></tr>    </ul></td></tr>
679    
680    </table>    </table>
681    <!-- END LEFT SIDE -->    <!-- END LEFT SIDE -->
# Line 562  Line 707 
707          <li>A new upstream version was found:          <li>A new upstream version was found:
708             (<xsl:value-of select="$other/watch/@new"/>). <a href="{$other/watch/@url}"><xsl:value-of select="$other/watch/@url"/></a></li>             (<xsl:value-of select="$other/watch/@new"/>). <a href="{$other/watch/@url}"><xsl:value-of select="$other/watch/@url"/></a></li>
709        </xsl:if>        </xsl:if>
710          <xsl:if test="$other/bugs/@patch!='0'">
711            <li>The Bug Tracking System contains <a href="http://bugs.debian.org/cgi-bin/pkgreport.cgi?which=src&amp;data={$package}&amp;include=patch&amp;exclude=pending"><xsl:value-of select="$other/bugs/@patch"/> patch(es)</a>, you should include it(them).</li>
712          </xsl:if>
713      </xsl:if>      </xsl:if>
714    </xsl:variable>    </xsl:variable>
715    <xsl:if test="count($todo)>0 and string($todo)!=''">    <xsl:if test="count($todo)>0 and string($todo)!=''">
# Line 570  Line 718 
718    Todo    Todo
719    </td></tr>    </td></tr>
720    <tr class="normalrow">    <tr class="normalrow">
721    <td class="contentcell2"><xsl:copy-of select="$todo"/>    <td class="contentcell2">
722      <ul>
723      <xsl:copy-of select="$todo"/>
724      </ul>
725    </td>    </td>
726    </tr>    </tr>
727    </xsl:if>    </xsl:if>
# Line 601  Line 752 
752      </xsl:if>      </xsl:if>
753      <xsl:if test="$hasother">      <xsl:if test="$hasother">
754    
755          <!-- Override disparity handling. [JvW] -->
756          <xsl:if test="$other/@override='yes'">
757            <xsl:for-each select="$other/override/group">
758              <li>There were override disparities found in suite <xsl:value-of
759                  select="@suite"/>:
760                <ul>
761                  <xsl:for-each select="disparity">
762                    <li><xsl:value-of select="text()"/></li>
763                  </xsl:for-each>
764                </ul>
765              </li>
766            </xsl:for-each>
767          </xsl:if>
768    
769        <!-- Wnpp handling. [PvR] -->        <!-- Wnpp handling. [PvR] -->
770        <xsl:if test="$other/@wnpp='yes'">        <xsl:if test="$other/@wnpp='yes'">
771        <li>        <li>
# Line 675  Line 840 
840    Problems    Problems
841    </td></tr>    </td></tr>
842    <tr class="normalrow">    <tr class="normalrow">
843    <td class="contentcell2"><xsl:copy-of select="$problems"/>    <td class="contentcell2">
844      <ul><xsl:copy-of select="$problems"/></ul>
845    </td>    </td>
846    </tr>    </tr>
847    </xsl:if>    </xsl:if>
# Line 687  Line 853 
853    </td></tr>    </td></tr>
854    <tr class="normalrow">    <tr class="normalrow">
855    <td class="contentcell2" style="text-align: left">    <td class="contentcell2" style="text-align: left">
856      <ul>
857    <xsl:for-each select="document(concat('../base/', $dir, '/excuse.xml'))/excuse/item">    <xsl:for-each select="document(concat('../base/', $dir, '/excuse.xml'))/excuse/item">
858      <xsl:call-template name="outputitem"/>      <xsl:call-template name="outputitem"/>
859    </xsl:for-each>    </xsl:for-each>
860      </ul>
861    </td>    </td>
862    </tr>    </tr>
863    </xsl:if>    </xsl:if>
# Line 708  Line 876 
876      Static Information      Static Information
877      </td></tr>      </td></tr>
878      <tr class="normalrow">      <tr class="normalrow">
879      <td class="contentcell2"><xsl:copy-of select="$static"/></td>      <td class="contentcell2">
880        <ul><xsl:copy-of select="$static"/></ul>
881        </td>
882      </tr>      </tr>
883    </xsl:if>    </xsl:if>
884    
# Line 725  Line 895 
895      Latest News      Latest News
896      </td></tr>      </td></tr>
897      <tr class="normalrow">      <tr class="normalrow">
898      <td class="contentcell2"><xsl:copy-of select="$news"/></td>      <td class="contentcell2">
899        <ul><xsl:copy-of select="$news"/></ul>
900        </td>
901      </tr>      </tr>
902    </xsl:if>    </xsl:if>
903    
# Line 734  Line 906 
906    </td></tr>    </td></tr>
907    </table>    </table>
908    <hr/>    <hr/>
909    Debian Package Tracking System - Copyright 2002-2004 Raphaël Hertzog<br/>    Debian Package Tracking System - Copyright 2002-2005 Raphaël Hertzog<br/>
910      Report problems to the <a href="http://bugs.debian.org/qa.debian.org"
911      >qa.debian.org pseudopackage</a><br/>
912    Last modified : <xsl:value-of select="$date"/>    Last modified : <xsl:value-of select="$date"/>
913    </body>    </body>
914    </html>    </html>

Legend:
Removed from v.909  
changed lines
  Added in v.1087

  ViewVC Help
Powered by ViewVC 1.1.5