You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-dev@james.apache.org by da...@apache.org on 2002/07/30 15:37:35 UTC

cvs commit: jakarta-james/src/xdocs/stylesheets site.xsl project.xml

danny       2002/07/30 06:37:34

  Modified:    src/xdocs contribute.xml
               src/xdocs/stylesheets project.xml
  Added:       src/xdocs stylesheet.css
               src/xdocs/stylesheets site.xsl
  Log:
  changing to XSL for building docs, removes velocity dependancy.
  Altered nav layout, added css stylesheet.
  
  Revision  Changes    Path
  1.3       +2 -2      jakarta-james/src/xdocs/contribute.xml
  
  Index: contribute.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-james/src/xdocs/contribute.xml,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- contribute.xml	29 Jul 2002 20:32:07 -0000	1.2
  +++ contribute.xml	30 Jul 2002 13:37:34 -0000	1.3
  @@ -59,12 +59,12 @@
   			reports, and contributed fixes, often by the same person. It is sometimes said that Apache 
   			projects evolve because users become so fed-up waiting for bugs to be addressed that they 
   			fix them themselves. :)<br/>
  -			If you report a bug, we'd often appreciate you sending a mail to the users or developers 
  +			If you report a bug, <a href="http://jakarta.apache.org/site/bugs.html">here</a> we'd appreciate it if you could send a mail to the users or developers 
   			mailing lists, so that we can discuss it with you, bugzilla isn't a great way for mediating 
   			communication.<br/>
   			If you want to fix a bug, please contribute your changes according to the guidelines above, 
   			in the Code Patches section. It is much simpler to deal with submissions if they all come 
  -			through the same channel.
  +			through the same channel. If you still really want to attach patches to bug submissions, please do send us a mail tagged [PATCH] too, so that we notice your patch.
   		</p>
   		</section>
   	
  
  
  
  1.1                  jakarta-james/src/xdocs/stylesheet.css
  
  Index: stylesheet.css
  ===================================================================
  body {  font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 10px}
  td {  font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px}
  strong {  font-weight: bold; font-size: 14px}
  table {  border-style: none}
  td {  border-style: none}
  
  
  
  1.12      +61 -61    jakarta-james/src/xdocs/stylesheets/project.xml
  
  Index: project.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-james/src/xdocs/stylesheets/project.xml,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- project.xml	29 Jul 2002 21:38:27 -0000	1.11
  +++ project.xml	30 Jul 2002 13:37:34 -0000	1.12
  @@ -1,61 +1,61 @@
  -<?xml version="1.0" encoding="ISO-8859-1"?>
  -<project name="JAMES"
  -        href="http://jakarta.apache.org/james/">
  -
  -    <title>Jakarta James</title>
  -    <logo href="/images/james-logo.jpg">JAMES - Java Apache Mail Enterprise Server</logo>
  -
  -    <body>
  -    <menu name="James">
  -        <item name="Overview"          href="/index.html"/>
  -        <item name="Architecture"      href="/architecture_v2_0.html"/>
  -		<item name="James FAQ"      href="/FAQ.html"/>
  -	</menu>
  -    
  -    <menu name="Translated {web}">
  -		<item name="Japanese" href="http://www.terra-intl.com/jakarta/james/"/>
  -	</menu>
  -	
  -    <menu name="Downloads">
  -        <item name="Binaries"              href="/site/binindex.html"/>
  -        <item name="Source Code"           href="/site/sourceindex.html"/>
  -    </menu>
  -	
  -    <menu name="Documentation">
  -        <item name="Install"           href="/install.html"/>
  -        <item name="Configuration"     href="/configuration_v2_0.html"/>
  -        <item name="James API"		href="/javadocs/index.html"/>
  -        <item name="Mailet API"     href="/mailet/index.html"/>
  -        <item name="Using JDBC"     href="/usingJDBC_v2.0.html"/>
  -        <item name="Using LDAP"     href="/usingLDAP_v1_2.html"/>
  -        <item name="Using TLS"     href="/usingTLS_v1_2.html"/>
  -        <item name="Useful RFCs {web}"   href="http://jakarta.apache.org/james/rfclist"/>
  -    </menu>
  -    
  -	<menu name="Project">        
  -        <item name="Bug Database "	   href="/site/bugs.html"/>
  -        <item name="How Can I Contribute?" href="/contribute.html"/>
  -        <item name="Coding Standards"  href="/code-standards.html"/>
  -        <item name="License"           href="/license.html"/>
  -        <item name="TODO"              href="/todo.html"/>
  -        <item name="Changelog"		   href="/changelog.html"/>
  -        <item name="Who We Are"		   href="/weare.html"/>
  -    </menu>    
  -
  -    <menu name="Jakarta Information {web}">
  -        <item name="Get Involved"          href="/site/getinvolved.html"/>
  -        <item name="CVS Repositories"      href="/site/cvsindex.html"/>
  -        <item name="Mailing Lists"         href="/site/mail.html"/>
  -        <item name="Reference Library"     href="/site/library.html"/>
  -        <item name="Front Page"            href="http://jakarta.apache.org/index.html"/>
  -        <item name="News &amp; Status"     href="/site/news.html"/>
  -        <item name="FAQs"                  href="/site/faqs.html"/>
  -    </menu>
  -
  -    <menu name="Related Projects {web}">
  -        <item name="Ant"                   href="http://jakarta.apache.org/ant/index.html"/>
  -        <item name="Avalon"                href="http://jakarta.apache.org/avalon/index.html"/>
  -    </menu>
  -
  -    </body>
  -</project>
  +<?xml version="1.0" encoding="ISO-8859-1"?>
  +<project name="JAMES"
  +        href="http://jakarta.apache.org/james/">
  +
  +    <title>Jakarta James</title>
  +    <logo href="/images/james-logo.jpg">JAMES - Java Apache Mail Enterprise Server</logo>
  +
  +    <body>
  +    <menu name="James">
  +        <item name="Overview"          href="/index.html"/>
  +        <item name="Architecture"      href="/architecture_v2_0.html"/>
  +		<item name="James FAQ"      href="/FAQ.html"/>
  +	</menu>
  +    
  +    <menu name="Translated">
  +		<item name="Japanese (web)" href="http://www.terra-intl.com/jakarta/james/"/>
  +	</menu>
  +	
  +    <menu name="Downloads">
  +        <item name="Binaries"              href="/site/binindex.html"/>
  +        <item name="Source Code"           href="/site/sourceindex.html"/>
  +    </menu>
  +	
  +    <menu name="Documentation">
  +        <item name="Install"           href="/install.html"/>
  +        <item name="Configuration"     href="/configuration_v2_0.html"/>
  +        <item name="James API"		href="/javadocs/index.html"/>
  +        <item name="Mailet API"     href="/mailet/index.html"/>
  +        <item name="Using JDBC"     href="/usingJDBC_v2.0.html"/>
  +        <item name="Using LDAP"     href="/usingLDAP_v1_2.html"/>
  +        <item name="Using TLS"     href="/usingTLS_v1_2.html"/>
  +        <item name="Useful RFCs (web)"   href="http://jakarta.apache.org/james/rfclist"/>
  +    </menu>
  +    
  +	<menu name="Project">        
  +        <item name="Bug Database "	   href="/site/bugs.html"/>
  +        <item name="How Can I Contribute?" href="/contribute.html"/>
  +        <item name="Coding Standards"  href="/code-standards.html"/>
  +        <item name="License"           href="/license.html"/>
  +        <item name="TODO"              href="/todo.html"/>
  +        <item name="Changelog"		   href="/changelog.html"/>
  +        <item name="Who We Are"		   href="/weare.html"/>
  +    </menu>    
  +
  +    <menu name="Jakarta Information (web)">
  +        <item name="Front Page"            href="http://jakarta.apache.org/index.html"/>
  +	<item name="News &amp; Status"     href="http://jakarta.apache.org/site/news.html"/>
  +	<item name="Mailing Lists"         href="http://jakarta.apache.org/site/mail.html"/>
  +	<item name="Get Involved"          href="http://jakarta.apache.org/site/getinvolved.html"/>
  +        <item name="CVS Repositories"      href="http://jakarta.apache.org/site/cvsindex.html"/>
  +        <item name="Reference Library"     href="http://jakarta.apache.org/site/library.html"/>
  +        <item name="FAQs"                  href="http://jakarta.apache.org/site/faqs.html"/>
  +    </menu>
  +
  +    <menu name="Related Projects (web)">
  +        <item name="Ant"                   href="http://jakarta.apache.org/ant/index.html"/>
  +        <item name="Avalon"                href="http://jakarta.apache.org/avalon/index.html"/>
  +    </menu>
  +
  +    </body>
  +</project>
  
  
  
  1.1                  jakarta-james/src/xdocs/stylesheets/site.xsl
  
  Index: site.xsl
  ===================================================================
  <?xml version="1.0" encoding="ISO-8859-1"?>
  <!-- Content Stylesheet for "jakarta-site2" Documentation -->
  <!-- NOTE:  Changes here should also be reflected in "site.vsl" and vice
       versa, so either Anakia or XSLT can be used for document generation.   -->
  
  
  <!-- Outstanding Compatibility Issues (with Anakia-based stylesheets):
  
  * Handling of the <image> element to insert relative path prefixes
  
  * Functional equivalent of "site_printable.vsl" not yet started.
  
  -->
  
  
  <!-- $Id: site.xsl,v 1.1 2002/07/30 13:37:34 danny Exp $ -->
  
  <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    version="1.0">
  
  
    <!-- Output method -->
    <xsl:output method="html"
              encoding="iso-8859-1"
                indent="yes"/>
  
  
    <!-- Defined parameters (overrideable) -->
    <xsl:param    name="relative-path" select="'.'"/>
  
    <!-- Defined variables (non-overrideable) -->
    <xsl:variable name="body-bg"       select="'#ffffff'"/>
    <xsl:variable name="body-fg"       select="'#000000'"/>
    <xsl:variable name="body-link"     select="'#525D76'"/>
    <xsl:variable name="banner-bg"     select="'#525D76'"/>
    <xsl:variable name="banner-fg"     select="'#ffffff'"/>
    <xsl:variable name="sub-banner-bg" select="'#828DA6'"/>
    <xsl:variable name="sub-banner-fg" select="'#ffffff'"/>
    <xsl:variable name="table-th-bg"   select="'#039acc'"/>
    <xsl:variable name="table-td-bg"   select="'#a0ddf0'"/>
    <xsl:variable name="source-color"  select="'#023264'"/>
  
  
    <!-- Process an entire document into an HTML page -->
    <xsl:template match="document">
      <xsl:variable name="project"
                  select="document('project.xml')/project"/>
  
      <html>
      <head>
      <xsl:apply-templates select="meta"/>
      <title><xsl:value-of select="$project/title"/> - <xsl:value-of select="properties/title"/></title>
      <xsl:for-each select="properties/author">
        <xsl:variable name="name">
          <xsl:value-of select="."/>
        </xsl:variable>
        <xsl:variable name="email">
          <xsl:value-of select="@email"/>
        </xsl:variable>
        <meta name="author" value="{$name}"/>
        <meta name="email" value="{$email}"/>
      </xsl:for-each>
      <LINK REL ="stylesheet" TYPE="text/css" HREF="stylesheet.css" TITLE="Style" />
      </head>
  
      <body bgcolor="{$body-bg}" text="{$body-fg}" link="{$body-link}"
            alink="{$body-link}" vlink="{$body-link}">
  
      <table border="0" width="100%" cellspacing="4">
  
        <xsl:comment>PAGE HEADER</xsl:comment>
        <tr><td colspan="2">
  
          <xsl:comment>JAKARTA LOGO</xsl:comment>
          <a href="http://jakarta.apache.org/">
            <img src="http://jakarta.apache.org/images/jakarta-logo.gif"
               align="left" alt="The Jakarta Project" border="0"/>
          </a>
          <xsl:if test="$project/logo">
            <xsl:variable name="alt">
              <xsl:value-of select="$project/logo"/>
            </xsl:variable>
            <xsl:variable name="home">
              <xsl:value-of select="$project/@href"/>
            </xsl:variable>
            <xsl:variable name="src">
              <xsl:value-of select="$project/logo/@href"/>
            </xsl:variable>
  
            <xsl:comment>PROJECT LOGO</xsl:comment>
            <a href="{$home}">
              <img src="{$home}/{$src}" align="right" alt="{$alt}" border="0"/>
            </a>
          </xsl:if>
  
        </td></tr>
  
        <xsl:comment>HEADER SEPARATOR</xsl:comment>
        <tr>
          <td colspan="2">
            <hr noshade="" size="1"/>
          </td>
        </tr>
  
        <tr>
  
          <xsl:comment>LEFT SIDE NAVIGATION</xsl:comment>
          <td width="20%" valign="top" nowrap="true">
            <xsl:apply-templates select="$project/body/menu"/>
          </td>
  
          <xsl:comment>RIGHT SIDE MAIN BODY</xsl:comment>
          <td width="80%" valign="top" align="left">
            <xsl:apply-templates select="body/section"/>
          </td>
  
        </tr>
  
        <xsl:comment>FOOTER SEPARATOR</xsl:comment>
        <tr>
          <td colspan="2">
            <hr noshade="" size="1"/>
          </td>
        </tr>
  
        <xsl:comment>PAGE FOOTER</xsl:comment>
        <tr><td colspan="2">
          <div align="center"><font color="{$body-link}" size="-1"><em>
          Copyright &#169; 1999-2002, Apache Software Foundation
          </em></font></div>
        </td></tr>
  
      </table>
      </body>
      </html>
  
    </xsl:template>
  
  
    <!-- Process a menu for the navigation bar -->
    <xsl:template match="menu">
      <p><strong><xsl:value-of select="@name"/></strong></p>
      <ul>
        <xsl:apply-templates select="item"/>
      </ul>
    </xsl:template>
  
  
    <!-- Process a menu item for the navigation bar -->
    <xsl:template match="item">
      <xsl:variable name="href">
        <xsl:choose>
              <xsl:when test="starts-with(@href, 'http://')">
                  <xsl:value-of select="@href"/>
              </xsl:when>
              <xsl:when test="starts-with(@href, '/site')">
                  <xsl:text>http://jakarta.apache.org</xsl:text><xsl:value-of select="@href"/>
              </xsl:when>
              <xsl:otherwise>
                  <xsl:value-of select="$relative-path"/><xsl:value-of select="@href"/>
              </xsl:otherwise>    
        </xsl:choose>
      </xsl:variable>
      <li><a href="{$href}"><xsl:value-of select="@name"/></a></li>
    </xsl:template>
  
  
    <!-- Process a documentation section -->
    <xsl:template match="section">
      <xsl:variable name="name">
        <xsl:value-of select="@name"/>
      </xsl:variable>
      <table border="0" cellspacing="0" cellpadding="2" width="100%">
        <!-- Section heading -->
        <tr><td bgcolor="{$banner-bg}">
            <font color="{$banner-fg}" face="arial,helvetica.sanserif">
            <a name="{$name}">
            <strong><xsl:value-of select="@name"/></strong></a></font>
        </td></tr>
        <!-- Section body -->
        <tr><td><blockquote>
          <xsl:apply-templates/>
        </blockquote></td></tr>
      </table>
    </xsl:template>
  
  
    <!-- Process a documentation subsection -->
    <xsl:template match="subsection">
      <xsl:variable name="name">
        <xsl:value-of select="@name"/>
      </xsl:variable>
      <table border="0" cellspacing="0" cellpadding="2" width="100%">
        <!-- Subsection heading -->
        <tr><td bgcolor="{$sub-banner-bg}">
            <font color="{$sub-banner-fg}" face="arial,helvetica.sanserif">
            <a name="{$name}">
            <strong><xsl:value-of select="@name"/></strong></a></font>
        </td></tr>
        <!-- Subsection body -->
        <tr><td><blockquote>
          <xsl:apply-templates/>
        </blockquote></td></tr>
      </table>
    </xsl:template>
  
  
    <!-- Process a source code example -->
    <xsl:template match="source">
      <div align="left">
        <table cellspacing="4" cellpadding="0" border="0">
          <tr>
            <td bgcolor="{$source-color}" width="1" height="1">
              <img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/>
            </td>
            <td bgcolor="{$source-color}" height="1">
              <img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/>
            </td>
            <td bgcolor="{$source-color}" width="1" height="1">
              <img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/>
            </td>
          </tr>
          <tr>
            <td bgcolor="{$source-color}" width="1">
              <img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/>
            </td>
            <td bgcolor="#ffffff" height="1"><pre>
              <xsl:value-of select="."/>
            </pre></td>
            <td bgcolor="{$source-color}" width="1">
              <img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/>
            </td>
          </tr>
          <tr>
            <td bgcolor="{$source-color}" width="1" height="1">
              <img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/>
            </td>
            <td bgcolor="{$source-color}" height="1">
              <img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/>
            </td>
            <td bgcolor="{$source-color}" width="1" height="1">
              <img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/>
            </td>
          </tr>
        </table>
      </div>
    </xsl:template>
  
    <!-- specially process td tags ala site.vsl -->
    <xsl:template match="td">
      <td bgcolor="{$table-td-bg}" valign="top" align="left">
          <xsl:if test="@colspan"><xsl:attribute name="colspan"><xsl:value-of select="@colspan"/></xsl:attribute></xsl:if>
          <xsl:if test="@rowspan"><xsl:attribute name="rowspan"><xsl:value-of select="@rowspan"/></xsl:attribute></xsl:if>
          <font color="#000000" size="-1" face="arial,helvetica,sanserif">
              <xsl:apply-templates/>
          </font>
      </td>
    </xsl:template>
    
    <!-- handle th ala site.vsl -->
    <xsl:template match="th">
      <td bgcolor="{$table-th-bg}" valign="top">
          <xsl:if test="@colspan"><xsl:attribute name="colspan"><xsl:value-of select="@colspan"/></xsl:attribute></xsl:if>
          <xsl:if test="@rowspan"><xsl:attribute name="rowspan"><xsl:value-of select="@rowspan"/></xsl:attribute></xsl:if>
          <font color="#000000" size="-1" face="arial,helvetica,sanserif">
              <xsl:apply-templates />
          </font>
      </td>
    </xsl:template>
    
    <!-- Process everything else by just passing it through -->
    <xsl:template match="*|@*">
      <xsl:copy>
        <xsl:apply-templates select="@*|*|text()"/>
      </xsl:copy>
    </xsl:template>
  
  </xsl:stylesheet>
  
  
  

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>