home *** CD-ROM | disk | FTP | other *** search
/ PC Professionell 2004 December / PCpro_2004_12.ISO / files / webserver / xampp / xampp-cocoon-addon-1.4.9-installer.exe / slashdot.xsl < prev    next >
Encoding:
Extensible Markup Language  |  2004-07-12  |  3.0 KB  |  89 lines

  1. <?xml version="1.0"?>
  2. <!--
  3.   Copyright 1999-2004 The Apache Software Foundation
  4.  
  5.   Licensed under the Apache License, Version 2.0 (the "License");
  6.   you may not use this file except in compliance with the License.
  7.   You may obtain a copy of the License at
  8.  
  9.       http://www.apache.org/licenses/LICENSE-2.0
  10.  
  11.   Unless required by applicable law or agreed to in writing, software
  12.   distributed under the License is distributed on an "AS IS" BASIS,
  13.   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  14.   See the License for the specific language governing permissions and
  15.   limitations under the License.
  16. -->
  17.  
  18. <!--
  19.     [XSL-XSLT] This stylesheet automatically updated from an IE5-compatible XSL stylesheet to XSLT.
  20.     The following problems which need manual attention may exist in this stylesheet:
  21.     -->
  22. <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
  23.  
  24.     <!-- [XSL-XSLT] Simulate lack of built-in templates -->
  25.     <xsl:template match="@*|/|node()"/>
  26.     <!-- Match The Root Node -->
  27.     <xsl:template match="/">
  28.         <HTML>
  29.         <BODY>
  30.         <xsl:apply-templates select="*"></xsl:apply-templates>
  31.         </BODY>
  32.         </HTML>
  33.     </xsl:template>
  34.     <!-- Match Everything Else -->
  35.     <xsl:template match="*|@*|text()|node()|comment()|processing-instruction()">
  36.         <xsl:copy>
  37.             <xsl:apply-templates select="*|@*|text()|node()|comment()|processing-instruction()"></xsl:apply-templates>
  38.         </xsl:copy>
  39.     </xsl:template>
  40.     <!-- Individual Templates -->
  41.     <xsl:template match="backslash">
  42.         <table border="0" width="100%">
  43.             <tr>
  44.                 <td colspan="5" STYLE="background-color : #B0E0E6; font : x-small Arial, Helvetica, sans-serif;">
  45.                     <CENTER>
  46.                     <b>Current News from Slashdot</b>
  47.                     </CENTER>
  48.                 </td>
  49.             </tr>
  50.             <xsl:apply-templates select="story"></xsl:apply-templates>
  51.         </table>
  52.     </xsl:template>
  53.     <xsl:template match="story">
  54.         <tr>
  55.             <xsl:if test="(position() mod 2) = 1">
  56.                 <xsl:attribute name="STYLE">background-color : lightgrey; font : x-small Arial, Helvetica, sans-serif;</xsl:attribute>
  57.             </xsl:if>
  58.             <xsl:if test="(position() mod 2) = 0">
  59.                 <xsl:attribute name="STYLE">font : x-small Arial, Helvetica, sans-serif;</xsl:attribute>
  60.             </xsl:if>
  61.             <td>
  62.             <CENTER>
  63.             <IMG WIDTH="25" HEIGHT="25" BORDER="0">
  64.                 <xsl:attribute name="SRC"><xsl:value-of select="image"></xsl:value-of></xsl:attribute>
  65.                 <xsl:attribute name="ALT"><xsl:value-of select="image"></xsl:value-of></xsl:attribute>
  66.             </IMG>
  67.             </CENTER>
  68.             </td>
  69.             <td STYLE="font : bold;" width="50%">
  70.                 <a>
  71.                     <xsl:attribute name="HREF"><xsl:value-of select="url"></xsl:value-of></xsl:attribute>
  72.                     <xsl:attribute name="STYLE">text-decoration : none;</xsl:attribute>
  73.                     <xsl:attribute name="TARGET">_blank</xsl:attribute>
  74.                     <xsl:value-of select="title"></xsl:value-of>
  75.                 </a>
  76.             </td>
  77.             <td STYLE="font-variant : small-caps;">
  78.                 <xsl:value-of select="topic"></xsl:value-of>
  79.             </td>
  80.             <td STYLE="font-variant : small-caps;">
  81.                 <xsl:value-of select="author"></xsl:value-of>
  82.             </td>
  83.             <td>
  84.                 <xsl:value-of select="time"></xsl:value-of>
  85.             </td>
  86.         </tr>
  87.     </xsl:template>
  88. </xsl:stylesheet>
  89.