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 / window.xsl < prev    next >
Encoding:
Extensible Markup Language  |  2004-07-12  |  3.6 KB  |  128 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. <xsl:stylesheet version="1.0" 
  18.                 xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
  19.  
  20. <xsl:template match="window">
  21.  
  22. <xsl:variable name="bgColor">
  23.   <xsl:choose>
  24.     <xsl:when test="@bgColor">
  25.         <xsl:value-of select="@bgColor" />
  26.     </xsl:when>
  27.     <xsl:otherwise>
  28.       <xsl:text>#CCCCCC</xsl:text>
  29.     </xsl:otherwise>
  30.   </xsl:choose>
  31. </xsl:variable>
  32.  
  33. <table border="2" cellSpacing="0" cellpadding="0" width="100%">
  34.     <tr vAlign="top">
  35.         <td bgColor="{$bgColor}" valign="middle">
  36.             <font>
  37.                 <xsl:attribute name="color">#ffffff</xsl:attribute>
  38.                 <xsl:attribute name="face">Arial</xsl:attribute>
  39.                 <xsl:attribute name="size">2</xsl:attribute>    
  40.                 <xsl:choose>
  41.                     <xsl:when test="@title">
  42.                         <b><xsl:value-of select="@title"/></b>
  43.                     </xsl:when>
  44.                     <xsl:otherwise>
  45.                         <b><xsl:value-of select="title"/></b>
  46.                     </xsl:otherwise>
  47.                 </xsl:choose>    
  48.             </font>
  49.         </td>
  50.         <td align="right" bgColor="{$bgColor}">
  51.             <xsl:if test="basket-add-link">
  52.                 <a href="{basket-add-link}">
  53.                       <img src="images/basket.gif" border="0" alt="Add Link"/>
  54.                   </a>
  55.             </xsl:if>
  56.             <xsl:if test="basket-add-content">
  57.                 <a href="{basket-add-content}">
  58.                       <img src="images/basket.gif" border="0" alt="Add Content"/>
  59.                   </a>
  60.             </xsl:if>
  61.             <xsl:if test="edit-uri">
  62.                 <a href="{edit-uri}">
  63.                       <img src="images/edit.gif" border="0" alt="Edit"/>
  64.                   </a>
  65.             </xsl:if>
  66.             <xsl:if test="help-uri">
  67.                 <a href="{help-uri}">
  68.                       <img src="images/help.gif" border="0" alt="Help"/>
  69.                   </a>
  70.             </xsl:if>
  71.             <xsl:if test="view-uri">
  72.                 <a href="{view-uri}">
  73.                       <img src="images/view.gif" border="0" alt="View"/>
  74.                   </a>
  75.             </xsl:if>
  76.             <xsl:if test="fullscreen-uri and not(maximize-uri)">
  77.                 <a href="{fullscreen-uri}">
  78.                       <img src="images/customize.gif" border="0" alt="Full Screen"/>
  79.                   </a>
  80.             </xsl:if>
  81.             <xsl:if test="maxpage-uri">
  82.                 <a href="{maxpage-uri}">
  83.                       <img src="images/show.gif" border="0" alt="Max Page"/>
  84.                   </a>
  85.             </xsl:if>
  86.             <xsl:if test="minpage-uri">
  87.                 <a href="{minpage-uri}">
  88.                       <img src="images/show.gif" border="0" alt="Min Page"/>
  89.                   </a>
  90.             </xsl:if>
  91.             <xsl:if test="maximize-uri">
  92.                 <a href="{maximize-uri}">
  93.                       <img src="images/maximize.gif" border="0" alt="Maximize"/>
  94.                   </a>
  95.             </xsl:if>
  96.             <xsl:if test="minimize-uri">
  97.                 <a href="{minimize-uri}">
  98.                       <img src="images/minimize.gif" border="0" alt="Minimize"/>
  99.                   </a>
  100.             </xsl:if>
  101.             <xsl:if test="remove-uri">
  102.                 <a href="{remove-uri}">
  103.                       <img src="images/delete.gif" border="0" alt="Delete"/>
  104.                   </a>
  105.             </xsl:if>
  106.         </td>
  107.     </tr>
  108.     <tr>
  109.         <td colSpan="2">
  110.                <xsl:apply-templates select="content"/>
  111.         </td>
  112.     </tr>
  113. </table>
  114. </xsl:template>
  115.  
  116. <xsl:template match="content">
  117.     <xsl:apply-templates/>
  118. </xsl:template>
  119.  
  120. <!-- Copy all and apply templates -->
  121. <xsl:template match="@*|node()">
  122.   <xsl:copy>
  123.     <xsl:apply-templates select="@*|node()" />
  124.   </xsl:copy>
  125. </xsl:template>
  126.  
  127. </xsl:stylesheet>
  128.