/[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 1744 by zack, Thu Nov 29 15:22:05 2007 UTC revision 1745 by zack, Thu Nov 29 19:06:47 2007 UTC
# Line 121  other-to-%xx, especially % to %25... For Line 121  other-to-%xx, especially % to %25... For
121    </xsl:if>    </xsl:if>
122  </xsl:template>  </xsl:template>
123    
124    <xsl:template name="output-news">
125      <xsl:param name="news" />
126    
127      <xsl:if test="count($news)>0 and string($news)!=''">
128        <tr class="titlerow">
129        <td class="titlecell">
130          Latest News <a class="feedlink" href="{$package}/news.rss20.xml">RSS</a>
131        </td></tr>
132        <tr class="normalrow">
133        <td class="contentcell2">
134        <ul><xsl:copy-of select="$news"/></ul>
135        </td>
136        </tr>
137      </xsl:if>
138    </xsl:template>
139    
140    <xsl:template name="output-static">
141      <xsl:param name="static" />
142    
143      <xsl:if test="count($static)>0 and string($static)!=''">
144        <tr class="titlerow">
145        <td class="titlecell">
146        Static Information
147        </td></tr>
148        <tr class="normalrow">
149        <td class="contentcell2">
150        <ul><xsl:copy-of select="$static"/></ul>
151        </td>
152        </tr>
153      </xsl:if>
154    </xsl:template>
155    
156    <xsl:variable name="static">
157      <xsl:if test="$hasnews">
158        <xsl:for-each select="document(concat('../base/', $dir, '/news.xml'))/news/static/item">
159          <xsl:call-template name="outputitem"/>
160        </xsl:for-each>
161      </xsl:if>
162    </xsl:variable>
163    
164    <xsl:variable name="news">
165      <xsl:if test="$hasnews">
166        <xsl:for-each select="document(concat('../base/', $dir, '/news.xml'))/news/news/item">
167          <xsl:call-template name="outputitem"/>
168        </xsl:for-each>
169      </xsl:if>
170    </xsl:variable>
171    
172  <!-- All the work is done in a single template -->  <!-- All the work is done in a single template -->
173  <xsl:template match="source">  <xsl:template match="source">
174    
# Line 133  other-to-%xx, especially % to %25... For Line 181  other-to-%xx, especially % to %25... For
181    <meta name="ROBOTS" content="NOFOLLOW"/>    <meta name="ROBOTS" content="NOFOLLOW"/>
182    <link type="text/css" title="Default" rel="stylesheet" href="../common/pts.css"/>    <link type="text/css" title="Default" rel="stylesheet" href="../common/pts.css"/>
183    <link type="text/css" title="Standard link rendering" rel="alternate stylesheet" href="../common/pts2.css"/>    <link type="text/css" title="Standard link rendering" rel="alternate stylesheet" href="../common/pts2.css"/>
184      <xsl:if test="count($news)>0 and string($news)!=''">
185        <link rel="alternate" type="application/rss+xml" title="RSS"
186          href="{$package}/news.rss20.xml" />
187      </xsl:if>
188    <title>Overview of <xsl:value-of select="$package"/> source package</title>    <title>Overview of <xsl:value-of select="$package"/> source package</title>
189    </head>    </head>
190    <body>    <body>
# Line 161  other-to-%xx, especially % to %25... For Line 213  other-to-%xx, especially % to %25... For
213    The old news are kept for historic purpose only.</p>    The old news are kept for historic purpose only.</p>
214    
215    <table class="righttable">    <table class="righttable">
216    <xsl:variable name="static">      <xsl:call-template name="output-static">
217      <xsl:if test="$hasnews">        <xsl:with-param name="static" select="$static" />
218        <xsl:for-each select="document(concat('../base/', $dir, '/news.xml'))/news/static/item">      </xsl:call-template>
219          <xsl:call-template name="outputitem"/>      <xsl:call-template name="output-news">
220        </xsl:for-each>        <xsl:with-param name="news" select="$news" />
221      </xsl:if>      </xsl:call-template>
   </xsl:variable>  
   <xsl:if test="count($static)>0 and string($static)!=''">  
     <tr class="titlerow">  
     <td class="titlecell">  
     Static Information  
     </td></tr>  
     <tr class="normalrow">  
     <td class="contentcell2">  
     <ul><xsl:copy-of select="$static"/></ul>  
     </td>  
     </tr>  
   </xsl:if>  
   
   <xsl:variable name="news">  
     <xsl:if test="$hasnews">  
       <xsl:for-each select="document(concat('../base/', $dir, '/news.xml'))/news/news/item">  
         <xsl:call-template name="outputitem"/>  
       </xsl:for-each>  
     </xsl:if>  
   </xsl:variable>  
   <xsl:if test="count($news)>0 and string($news)!=''">  
     <tr class="titlerow">  
     <td class="titlecell">  
     Latest News  
     </td></tr>  
     <tr class="normalrow">  
     <td class="contentcell2">  
     <ul><xsl:copy-of select="$news"/></ul>  
     </td>  
     </tr>  
   </xsl:if>  
222    </table>    </table>
223    
224    <!-- END REMOVED PACKAGE -->    <!-- END REMOVED PACKAGE -->
# Line 1054  other-to-%xx, especially % to %25... For Line 1075  other-to-%xx, especially % to %25... For
1075    </td>    </td>
1076    </tr>    </tr>
1077    </xsl:if>    </xsl:if>
   
   
   <xsl:variable name="static">  
     <xsl:if test="$hasnews">  
       <xsl:for-each select="document(concat('../base/', $dir, '/news.xml'))/news/static/item">  
         <xsl:call-template name="outputitem"/>  
       </xsl:for-each>  
     </xsl:if>  
   </xsl:variable>  
   <xsl:if test="count($static)>0 and string($static)!=''">  
     <tr class="titlerow">  
     <td class="titlecell">  
     Static Information  
     </td></tr>  
     <tr class="normalrow">  
     <td class="contentcell2">  
     <ul><xsl:copy-of select="$static"/></ul>  
     </td>  
     </tr>  
   </xsl:if>  
1078    
1079    <xsl:variable name="news">    <xsl:call-template name="output-static">
1080      <xsl:if test="$hasnews">      <xsl:with-param name="static" select="$static" />
1081        <xsl:for-each select="document(concat('../base/', $dir, '/news.xml'))/news/news/item">    </xsl:call-template>
1082          <xsl:call-template name="outputitem"/>    <xsl:call-template name="output-news">
1083        </xsl:for-each>      <xsl:with-param name="news" select="$news" />
1084      </xsl:if>    </xsl:call-template>
   </xsl:variable>  
   <xsl:if test="count($news)>0 and string($news)!=''">  
     <tr class="titlerow">  
     <td class="titlecell">  
     Latest News  
     </td></tr>  
     <tr class="normalrow">  
     <td class="contentcell2">  
     <ul><xsl:copy-of select="$news"/></ul>  
     </td>  
     </tr>  
   </xsl:if>  
1085    
1086    </table>    </table>
1087    <!-- END RIGHT SIDE -->    <!-- END RIGHT SIDE -->

Legend:
Removed from v.1744  
changed lines
  Added in v.1745

  ViewVC Help
Powered by ViewVC 1.1.5