You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@cocoon.apache.org by ni...@apache.org on 2002/03/18 20:23:31 UTC

cvs commit: xml-cocoon2/src/webapp/welcome cocoon.gif status2html.xsl welcome.xhtml

nicolaken    02/03/18 11:23:31

  Added:       src/webapp/welcome cocoon.gif status2html.xsl welcome.xhtml
  Log:
  Partial commit of new samples structure.
  Samples go in samples/ dir with theit own sitemap.
  All scratchpad samples that are in the samples/ subdir are copied in webapp samples automatically by installscratchpadwar target.
  cocoon.xconf is moved in WEB-INF for security reasons.
  Added new "gump" target to build; it calls docs, javadocs, test and package.
  
  Revision  Changes    Path
  1.1                  xml-cocoon2/src/webapp/welcome/cocoon.gif
  
  	<<Binary file>>
  
  
  1.1                  xml-cocoon2/src/webapp/welcome/status2html.xsl
  
  Index: status2html.xsl
  ===================================================================
  <?xml version="1.0"?>
  <!-- Author: Nicola Ken Barozzi "barozzi@nicolaken.com" -->
  <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:status="http://apache.org/cocoon/status/2.0">
     <xsl:template match="status:statusinfo">
        <html>
           <head>
              <title>Cocoon2 on [
              <xsl:value-of select="@status:host" />
  
              ]</title>
           </head>
  
           <body bgcolor="white">
              <table bgcolor="#000000" cellspacing="0" cellpadding="2" width="97%">
                 <tr>
                    <td>
                       <table border="0" bgcolor="#000000" cellpadding="0" cellspacing="0" width="100%">
                          <tr>
                             <td>
                                <table bgcolor="#ffffff" noshade="noshade" cellspacing="0" cellpadding="6" width="100%">
                                   <tr>
                                      <td bgcolor="#0086b2" valign="top" align="left">
                                         <font size="5" face="arial,helvetica,sanserif" color="#ffffff">Apache Cocoon running on 
                                         <xsl:value-of select="@status:host" />
                                         </font>
                                      </td>
  
                                      <td bgcolor="#0086b2" valign="top" align="right">
                                         <font face="arial,helvetica,sanserif" color="#ffffff">
                                            <xsl:value-of select="@status:date" />
                                         </font>
                                      </td>
                                   </tr>
                                </table>
                             </td>
                          </tr>
                       </table>
                    </td>
                 </tr>
              </table>
  
              <xsl:call-template name="spacer">
                 <xsl:with-param name="height" select="number(10)" />
              </xsl:call-template>
  
              <xsl:apply-templates />
           </body>
        </html>
     </xsl:template>
  
     <xsl:template match="status:group">
        <table border="0" bgcolor="#000000" cellpadding="0" cellspacing="0" width="100%">
           <tr>
              <td>
                 <table bgcolor="#000000" border="0" cellspacing="2" cellpadding="6" width="100%">
                    <tr>
                       <td bgcolor="#0086b2" valign="top" align="left" colspan="2">
                          <FONT color="#ffffff" face="arial,helvetica,sanserif" size="+1">-
                          <xsl:value-of select="@status:name" />
                          </FONT>
                       </td>
                    </tr>
                 </table>
  
                 <table bgcolor="#ffffff" border="0" cellspacing="2" cellpadding="6" width="100%">
                    <tr>
                       <td bgcolor="#ffffff">
                          <table border="0" bgcolor="#000000" cellpadding="0" cellspacing="0" width="100%">
                             <tr>
                                <td>
                                   <table width="100%" bgcolor="#000000" border="0" cellspacing="2" cellpadding="6">
                                      <xsl:apply-templates select="status:value" />
  
                                      <xsl:call-template name="spacer">
                                         <xsl:with-param name="height" select="number(8)" />
                                      </xsl:call-template>
  
                                      <xsl:apply-templates select="status:group" />
                                   </table>
                                </td>
                             </tr>
                          </table>
                       </td>
                    </tr>
                 </table>
              </td>
           </tr>
        </table>
  
        <xsl:call-template name="spacer">
           <xsl:with-param name="height" select="number(6)" />
        </xsl:call-template>
     </xsl:template>
  
     <xsl:template match="status:value">
        <tr>
           <td bgcolor="#0086b2" valign="top" align="left" width="1%">
              <font face="arial,helvetica,sanserif" color="#ffffff">
                 <xsl:value-of select="@status:name" />
              </font>
           </td>
  
           <td bgcolor="#eeeeee" width="100%">
              <xsl:choose>
                 <xsl:when test="../@status:name='memory' and ( @status:name='total' or @status:name='free')">
                    <font face="arial,helvetica,sanserif">
                       <xsl:call-template name="suffix">
                          <xsl:with-param name="bytes" select="number(.)" />
                       </xsl:call-template>
                    </font>
                 </xsl:when>
  
                 <xsl:when test="count(status:line) &lt;= 1">
                    <font face="arial,helvetica,sanserif">
                       <xsl:value-of select="status:line" />
                    </font>
                 </xsl:when>
  
                 <xsl:otherwise>
                    <ul>
                       <xsl:apply-templates />
                    </ul>
                 </xsl:otherwise>
              </xsl:choose>
           </td>
        </tr>
     </xsl:template>
  
     <xsl:template match="status:line">
        <li>
           <font face="arial,helvetica,sanserif">
              <xsl:value-of select="." />
           </font>
        </li>
     </xsl:template>
  
     <xsl:template name="suffix">
        <xsl:param name="bytes" />
  
        <xsl:choose>
  <!-- More than 4 MB (=4194304) -->
           <xsl:when test="$bytes &gt;= 4194304">
           <xsl:value-of select="round($bytes div 10485.76) div 100" />
  
           MB 
           <small>(
           <xsl:value-of select="$bytes" />
  
           )</small>
           </xsl:when>
  
  <!-- More than 4 KB (=4096) -->
           <xsl:when test="$bytes &gt; 4096">
           <xsl:value-of select="round($bytes div 10.24) div 100" />
  
           KB 
           <small>(
           <xsl:value-of select="$bytes" />
  
           )</small>
           </xsl:when>
  
  <!-- Less -->
           <xsl:otherwise>
           <xsl:value-of select="$bytes" />
  
           B</xsl:otherwise>
        </xsl:choose>
     </xsl:template>
  
     <xsl:template name="spacer">
        <xsl:param name="height" />
  
        <table bgcolor="#ffffff" cellspacing="0" cellpadding="2" width="100%">
           <tr>
              <td bgcolor="#ffffff">
                 <table bgcolor="#ffffff" cellspacing="0" cellpadding="2" width="100%">
                    <tr>
                       <td width="100%" bgcolor="#ffffff" valign="top" align="left" height="$height">
                       </td>
                    </tr>
                 </table>
              </td>
           </tr>
        </table>
     </xsl:template>
  </xsl:stylesheet>
  
  
  
  
  1.1                  xml-cocoon2/src/webapp/welcome/welcome.xhtml
  
  Index: welcome.xhtml
  ===================================================================
  <html xmlns:xlink="http://www.w3.org/1999/xlink">
     <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
  
        <title>Apache Cocoon 2.0.2-dev</title>
  
        <link href="favicon.ico" rel="SHORTCUT ICON" />
     </head>
  
     <body alink="#743e75" vlink="#00698c" link="#0086b2" bgcolor="#ffffff">
        <table width="60%" align="center" cellpadding="2" cellspacing="2" border="0">
           <tbody>
              <tr>
                 <td align="center">
                    <font color="#000000" face="arial,helvetica,sanserif">The Apache Software Foundation is proud to present...</font>
                 </td>
              </tr>
  
              <tr>
                 <td align="center" width="40%">
                    <img src="cocoon.gif" border="0" />
                 </td>
              </tr>
  
              <tr>
                 <td align="center" width="30%">
                    <font color="#000000" face="arial,helvetica,sanserif">
                       <b>version 2.0.2-dev</b>
                    </font>
                 </td>
              </tr>
           </tbody>
        </table>
  
        <p align="center">
        </p>
  
        <table width="60%" align="center" cellpadding="2" cellspacing="2" border="0" bgcolor="#000000">
           <tbody>
              <tr align="center">
                 <td width="100%" bgcolor="#0086b2">
                    <font color="#ffffff" face="arial,helvetica,sanserif" size="+1">Welcome!</font>
                 </td>
              </tr>
  
              <tr>
                 <td align="left" bgcolor="#ffffff" width="100%">
                    <table align="center" cellpadding="2" cellspacing="0" border="0" bgcolor="#ffffff" width="100%">
                       <tbody>
                          <tr>
                             <td align="left" bgcolor="#ffffff" width="100%">
                                <font color="#000000" face="arial,helvetica,sanserif" size="+0">It seems you got me running :) 
                                <br />
  
                                Here are some links to the relevant portions of the demo webapp.</font>
  
                                <br />
  
                                <font color="#000000" face="arial,helvetica,sanserif" size="+0">
                                </font>
                             </td>
                          </tr>
  
                          <tr>
                             <td align="left" bgcolor="#ffffff" width="100%">
                                <font color="#000000" face="arial,helvetica,sanserif" size="+0">
                                <a href="status">Status</a>
  
                                - How is life going on here in my server world? Find out :)</font>
                             </td>
                          </tr>
  
                          <tr>
                             <td align="left" bgcolor="#ffffff" width="100%">
                                <font color="#000000" face="arial,helvetica,sanserif" size="+0">
                                <a href="documents/index">Documentations</a>
  
                                - Who am I? Information, tutorials and references about me are here.</font>
                             </td>
                          </tr>
  
                          <tr>
                             <td align="left" bgcolor="#ffffff" width="100%">
                                <font color="#000000" face="arial,helvetica,sanserif" size="+0">
                                <a href="search/welcome">Search</a>
  
                                - Need to search for a specific thing about me? Let me do the work for you.</font>
                             </td>
                          </tr>
  
                          <tr>
                             <td align="left" bgcolor="#ffffff" width="100%">
                                <font color="#000000" face="arial,helvetica,sanserif" size="+0">
                                <a href="welcome">Samples</a>
  
                                - Are you being served, sir?</font>
                             </td>
                          </tr>
  
                          <tr>
                             <td align="left" bgcolor="#ffffff" width="100%">
                                <font color="#000000" face="arial,helvetica,sanserif" size="+0">
                                <i>
                                   <a href="samples/welcome">Refactored Samples (WIP)</a>
                                </i>
  
                                - I can serve you better, but I haven't finished rehersal just yet ;)</font>
                             </td>
                          </tr>
                       </tbody>
                    </table>
                 </td>
              </tr>
           </tbody>
        </table>
  
        <p align="center">
           <br />
  
           <font size="-1">Copyright &#194;&#169; 1999-2002 
           <a href="http://www.apache.org/">The Apache Software Foundation</a>
  
           . 
           <br />
  
           All rights reserved.</font>
        </p>
     </body>
  </html>
  
  
  
  

----------------------------------------------------------------------
In case of troubles, e-mail:     webmaster@xml.apache.org
To unsubscribe, e-mail:          cocoon-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-cvs-help@xml.apache.org