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 / mail-folder2document.xsl < prev    next >
Encoding:
Extensible Markup Language  |  2004-07-12  |  2.8 KB  |  87 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.   xmlns:page="http://apache.org/cocoon/paginate/1.0"
  20.   xmlns:mail="http://apache.org/cocoon/mail/1.0"
  21.   exclude-result-prefixes="xsl page"
  22. >
  23.  
  24. <xsl:template match="/">
  25. <!--xsl:copy-of select="."/-->
  26.   <document>
  27.     <header>
  28.       <title>Folder</title>
  29.     </header>
  30.     <body>
  31.       <xsl:apply-templates/>
  32.     </body>
  33.   </document>
  34. </xsl:template>
  35.  
  36. <xsl:template match="mail:folder">
  37.     <xsl:attribute name="title">Folder - <xsl:value-of select="@name"/></xsl:attribute>
  38.     
  39.     <xsl:variable name="is-directory" select="@is-directory"/>
  40.     <xsl:variable name="holds-messages" select="@holds-messages"/>
  41.     <div class="list" style="width: 90%;">
  42.       <div class="row">
  43.         <span style="color: #887788; font-size:150%" class="left"> 
  44.         Name <xsl:value-of select="@full-name"/>
  45.         <xsl:text> </xsl:text>
  46.         <xsl:if test="$is-directory = 'yes'">
  47.             <a>
  48.               <xsl:attribute name="href">mail.html?cmd=list-folder&folder=<xsl:value-of select="@full-name"/></xsl:attribute>
  49.               folders
  50.             </a>
  51.         </xsl:if>
  52.         <xsl:text> </xsl:text>
  53.         <xsl:if test="$holds-messages = 'yes'">
  54.             <xsl:if test="@has-new-messages = 'yes'">
  55.               has new messages
  56.               <xsl:text> </xsl:text>
  57.             </xsl:if>
  58.             <a>
  59.               <xsl:attribute name="href">mail.html?cmd=list-folder-messages&folder=<xsl:value-of select="@full-name"/></xsl:attribute>
  60.               messages
  61.             </a>
  62.         </xsl:if>
  63.  
  64.         </span>
  65.       </div>
  66.       <div class="row">
  67.         <span class="left">Total/New/Deleted/Unread Messages </span> 
  68.         <span class="right">
  69.           <xsl:value-of select="@total-messages"/> /
  70.           <xsl:value-of select="@new-messages"/> / 
  71.           <xsl:value-of select="@deleted-messages"/> /
  72.           <xsl:value-of select="@unread-messages"/> 
  73.         </span>
  74.       </div>
  75.       <div class="spacer"/>
  76.     </div>
  77. </xsl:template>
  78.  
  79. <xsl:template match="@*|*|text()" priority="-1">
  80.   <xsl:copy>
  81.     <xsl:apply-templates select="@*|*|text()"/>
  82.   </xsl:copy>
  83. </xsl:template>
  84.  
  85. </xsl:stylesheet>
  86.  
  87.