alvinalexander.com | career | drupal | java | mac | mysql | perl | scala | uml | unix  
<xsl:choose> <xsl:when test="@holds_folders = 'true'"> <TD bgcolor="#E2E6F0" COLSPAN="{/USERMODEL/STATEDATA/VAR[@name='max folder depth']/@value - $level - 1}" valign="middle" class="testoGrande"> <xsl:choose> <xsl:when test="@subscribed = 'true'"> <STRONG> </xsl:when> <xsl:otherwise> <EM> </xsl:otherwise> </xsl:choose> </TD> <TD WIDTH="58%" bgcolor="#D3D8DE" valign="middle" class="testoNero"> <A HREF="{$base}/folder/setup?session-id={$session-id}&method=folderadd&addto={@id}">新增子收信匣 - 刪除這個信箱(以及其所有的子收信匣) - <xsl:choose> <xsl:when test="@subscribed = 'true'"> <A HREF="{$base}/folder/setup?session-id={$session-id}&method=folder&hide={@id}&">隱藏 </xsl:when> <xsl:otherwise> <A HREF="{$base}/folder/setup?session-id={$session-id}&method=folder&unhide={@id}&">不隱藏 </xsl:otherwise> </xsl:choose> </TD> <TD width="2%" class="testoScuro">   </TD> </xsl:when> <xsl:otherwise> <TD COLSPAN="{/USERMODEL/STATEDATA/VAR[@name='max folder depth']/@value - $level - 1}"> <xsl:choose> <xsl:when test="@subscribed = 'true'"> <xsl:value-of select="@name"/> </xsl:when> <xsl:otherwise> <EM> </xsl:otherwise> </xsl:choose> </TD> <TD> <A HREF="{$base}/folder/setup?session-id={$session-id}&method=folder&remove={@id}">刪除這個子收信匣 - <xsl:choose> <xsl:when test="@subscribed = 'true'"> <A HREF="{$base}/folder/setup?session-id={$session-id}&method=folder&hide={@id}&">隱藏 </xsl:when> <xsl:otherwise> <A HREF="{$base}/folder/setup?session-id={$session-id}&method=folder&unhide={@id}&">不隱藏 </xsl:otherwise> </xsl:choose> </TD> </xsl:otherwise> </xsl:choose> </TR> <xsl:for-each select="FOLDER"> <xsl:apply-templates select="."/> </xsl:for-each> </xsl:template> <!-- Create an appropriate number of before a folder, depending on the level --> <xsl:template name="recurse-folder"> <xsl:param name="level"/> <xsl:if test="$level>0"> <TD bgcolor="#E2E6F0" class="testoNero">  <xsl:variable name="levelneu" select="$level - 1"/> <xsl:call-template name="recurse-folder"> <xsl:with-param name="level" select="$levelneu"/> </xsl:call-template> </xsl:if> </xsl:template> </xsl:stylesheet>

What this is

This file is included in the DevDaily.com "Java Source Code Warehouse" project. The intent of this project is to help you "Learn Java by Example" TM.

Other links

The source code

<?xml version="1.0" encoding="UTF-8"?>
<!--
 * Copyright (C) 2000 Sebastian Schaffert
 * 
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License
 * as published by the Free Software Foundation; either version 2
 * of the License, or (at your option) any later version.
 * 
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
-->

<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
  <xsl:output method="html" indent="yes"/>
  
    <xsl:variable name="imgbase" select="/USERMODEL/STATEDATA/VAR[@name='img base uri']/@value"/>
    <xsl:variable name="base" select="/USERMODEL/STATEDATA/VAR[@name='base uri']/@value"/>
    <xsl:variable name="session-id" select="/USERMODEL/STATEDATA/VAR[@name='session id']/@value"/>

    <xsl:template match="/">
    
    <HTML>
      <HEAD>
        <TITLE>  的 WebMail 信箱:收信匣設定
	<META CONTENT="AUTHOR" VALUE="Sebastian Schaffert"/>
	<META CONTENT="GENERATOR" VALUE="JWebMail 0.7 XSL"/>
	<link rel="stylesheet" href="{$base}/passthrough/webmail.css"/>
      </HEAD>
      
      <BODY bgcolor="#B5C1CF" topmargin="5" leftmargin="0" marginwidth="0" marginheight="5">		  
	<TABLE width="100%" border="0" cellspacing="2" cellpadding="4">
  <TR> 
	    <TD colspan="4" height="22" class="testoNero">
	      <IMG SRC="{$imgbase}/images/icona_folder.gif" align="absmiddle"/>
	    <xsl:value-of select="/USERMODEL/USERDATA/FULL_NAME"/> 的 WebMail 收信匣設定 (求救)
    </TD>
	   </TR>
	   <TR>
	    <TD colspan="4" bgcolor="#697791" height="22" class="testoBianco">
	        登入帳號 <xsl:value-of select="normalize-space(/USERMODEL/USERDATA/LOGIN)"/>
	   </TD>
	  </TR>
	</TABLE>
	 
	<TABLE WIDTH="100%" border="0" cellspacing="0" cellpadding="3">
	  <xsl:for-each select="/USERMODEL/MAILHOST_MODEL">
	    <xsl:apply-templates select="."/>
	  </xsl:for-each>
	</TABLE>
     
	<P class="testoChiaro">
	  以 <SPAN class="bold">粗體 表示的是可以包含子收信匣的收信匣,而以正常字體顯示的收信匣則是不能包含子收信匣的收信匣。以 斜體 顯示的則是隱藏的收信匣(在信箱清單的視窗中),其他的則否。
	</P>
	<P class="testoChiaro">
	  <SPAN class="testoRosso">警告!如果您刪除了一個子收信匣,所有在該收信匣中的信件(與子收信匣),不僅僅是 WebMail 系統,甚至是 實際的電子郵件伺服器,都會被 刪除!這是相當危險而且無法還原的動作!
	</P>
	
      </BODY>


    </HTML>
  </xsl:template>
  
  <xsl:template match="/USERMODEL/USERDATA/INTVAR">
    <xsl:value-of select="@value"/>
  </xsl:template>		    
  
  <xsl:template match="/USERMODEL/STATEDATA/VAR">
    <xsl:value-of select="@value"/>
  </xsl:template>		    

  <xsl:template match="/USERMODEL/MAILHOST_MODEL">
    <TR>
      <TD COLSPAN="{/USERMODEL/STATEDATA/VAR[@name='max folder depth']/@value}" WIDTH="40%" bgcolor="#A6B1C0" class="testoGrande">
	<SPAN class="testoVerde">
      </TD>
      <TD bgcolor="#909CAF" width="58%" class="testoScuro">電子郵件伺服器:
      </TD>
      <TD bgcolor="#909CAF" width="2%" class="testoScuro">
	 
      </TD>
    </TR>
    <xsl:for-each select="FOLDER">
      <xsl:apply-templates select="."/>
    </xsl:for-each>
  </xsl:template>

  <xsl:template match="FOLDER">
    <xsl:variable name="level" select="count(ancestor::FOLDER)"/>
    <TR>
      <xsl:call-template name="recurse-folder">
         <xsl:with-param name="level" select="$level"/>
      </xsl:call-template>
      <TD bgcolor="#E2E6F0" align="right">
... this post is sponsored by my books ...

#1 New Release!

FP Best Seller

 

new blog posts

 

Copyright 1998-2021 Alvin Alexander, alvinalexander.com
All Rights Reserved.

A percentage of advertising revenue from
pages under the /java/jwarehouse URI on this website is
paid back to open source projects.