sraeburn    2003/09/07 18:35:54

  Modified:    doc/stylesheets struts.xsl
               doc/tiles installation.xml
               .        build-webapps.xml build.xml
               doc      struts.css
  Added:       doc/tiles project.xml
  Removed:     doc/stylesheets news.xsl resources.xsl faqs.xsl
                        userGuide.xsl proposals.xsl tiles.xsl
  Log:
  Docs converted to use single XSL stylesheet. 
  Ant build files changed to avoid duplication of documentation build steps.
  
  Revision  Changes    Path
  1.11      +74 -18    jakarta-struts/doc/stylesheets/struts.xsl
  
  Index: struts.xsl
  ===================================================================
  RCS file: /home/cvs/jakarta-struts/doc/stylesheets/struts.xsl,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- struts.xsl        5 Sep 2003 23:02:40 -0000       1.10
  +++ struts.xsl        8 Sep 2003 01:35:53 -0000       1.11
  @@ -1,10 +1,11 @@
   <?xml version="1.0" encoding="ISO-8859-1"?>
  -<!-- Content Stylesheet for Struts Documentation -->
  +<!-- Content Stylesheet for Struts User's Guide -->
   <!-- $Id$ -->
   
   <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
     version="1.0">
   
  +
     <!-- Output method -->
     <xsl:output method="xml" 
              version="1.0" 
  @@ -15,11 +16,24 @@
              indent="yes" 
              media-type="text/html"/>
   
  +
  +  <!-- Defined parameters (overrideable) -->
  +  <xsl:param    name="home-logo"         select="'/images/jakarta-logo.gif'"/>
  +  <xsl:param    name="powered-logo"      select="'/images/struts-power.gif'"/>
  +  <xsl:param    name="project-logo"      select="'/images/struts.gif'"/>
  +  <xsl:param    name="project-name"      select="'Struts Framework'"/>
  +  <xsl:param    name="relative-path"     select="'..'"/>
  +  <xsl:param    name="css-path"          select="'/struts.css'"/>
  +  <xsl:param    name="project-path"      select="'../project.xml'"/>
  +  
  +
  +  <!-- Import project information document -->
  +  <xsl:variable name="project"
  +                select="document($project-path)/project"/>  
  +
  +
     <!-- Process an entire document into an HTML page -->
     <xsl:template match="document">
  -    <xsl:variable name="project"
  -                select="document('../project.xml')/project"/>
  -
       <html xmlns="http://www.w3.org/1999/xhtml"; xml:lang="en">
       <head>
       <xsl:choose>
  @@ -33,22 +47,44 @@
           <title><xsl:value-of select="$project/title"/></title>
         </xsl:otherwise>
       </xsl:choose>
  +
       <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />   
  -    <meta name="author" content="{properties/author/.}"/>
  -    <link rel="stylesheet" type="text/css" href="struts.css"/>
  +
  +    <xsl:for-each select="properties/author">
  +    <xsl:variable name="author">
  +      <xsl:value-of select="."/>
  +    </xsl:variable>
  +    <meta name="author" content="{$author}"/>
  +    </xsl:for-each>
  +
  +    <xsl:variable name="css">
  +      <xsl:value-of select="$relative-path"/>/struts.css
  +    </xsl:variable>      
  +    <link rel="stylesheet" type="text/css" href="{$css}"/>
       </head>
   
       <body>
  -
  + 
       <table border="0" width="100%" cellspacing="5">
   
         <tr><td colspan="2">
  -        <a href="http://jakarta.apache.org";>
  -        <img src="images/jakarta-logo.gif" align="left" border="0" alt="The Apache 
Jakarta Project"/>
  +
  +        <xsl:comment>JAKARTA LOGO</xsl:comment>
  +        <xsl:variable name="src">
  +          <xsl:value-of select="$relative-path"/><xsl:value-of select="$home-logo"/>
  +        </xsl:variable>
  +        <a href="http://jakarta.apache.org/";>
  +        <img src="{$src}" align="left" alt="The Jakarta Project" border="0" 
id="jakarta-logo"/>
           </a>
  -        <a href="http://jakarta.apache.org/struts";>
  -        <img src="images/struts.gif" align="right" border="0" alt="Struts"/>
  +
  +        <xsl:comment>STRUTS LOGO</xsl:comment>
  +        <xsl:variable name="src">
  +          <xsl:value-of select="$relative-path"/><xsl:value-of 
select="$project-logo"/>
  +        </xsl:variable>
  +        <a href="http://jakarta.apache.org/struts/";>
  +        <img src="{$src}" align="right" alt="Struts Framework" border="0"/>
           </a>
  +
         </td></tr>
   
         <tr><td colspan="2">
  @@ -56,9 +92,9 @@
         </td></tr>
   
         <tr>
  -        <td width="120" valign="top">
  -          <xsl:apply-templates select="$project"/>
  -        </td>
  +          <td width="120" valign="top" class="menu">
  +            <xsl:apply-templates select="$project"/>
  +          </td>
   
           <td valign="top">
             <xsl:apply-templates select="body"/>
  @@ -71,9 +107,13 @@
   
         <tr><td colspan="2">
           <div class="footer">
  -        Copyright (c) 2000-2003, Apache Software Foundation - <a 
href="http://nagoya.apache.org/wiki/apachewiki.cgi?StrutsDocComments";>Comments?</a>
  +        Copyright (c) 2000-2003, Apache Software Foundation <span class="noprint">- 
<a 
href="http://nagoya.apache.org/wiki/apachewiki.cgi?StrutsDocComments";>Comments?</a></span>
           </div>
  -        <img src="images/struts-power.gif" align="right" border="0" alt="Powered by 
Struts"/>
  +
  +          <xsl:variable name="src">
  +            <xsl:value-of select="$relative-path"/><xsl:value-of 
select="$powered-logo"/>
  +          </xsl:variable>
  +          <img src="{$src}" alt="Powered by Struts" align="right" border="0"/>
         </td></tr>
   
       </table>
  @@ -82,14 +122,17 @@
   
     </xsl:template>
   
  +
     <!-- Process the project element for the navigation bar -->
     <xsl:template match="project">
       <xsl:apply-templates/>
     </xsl:template>
  -  
  +
  +
     <!-- Silently skip title element in project.xml -->
     <xsl:template match="title"/> 
   
  +
     <!-- Process a menu for the navigation bar -->
     <xsl:template match="menu">
       <table border="0" cellspacing="5">
  @@ -125,6 +168,7 @@
     <xsl:template match="body">
       <xsl:apply-templates/>
     </xsl:template>
  +  
   
     <!-- Process an entire chapter (assumes one chapter per page) -->
     <xsl:template match="chapter">
  @@ -149,6 +193,7 @@
       </table>
       <xsl:apply-templates select="section" />
     </xsl:template>
  +  
   
     <!-- Process a documentation section -->
     <xsl:template match="section">
  @@ -172,6 +217,7 @@
       </table>
     </xsl:template>
   
  +
     <!-- Process a documentation subsection -->
     <xsl:template match="subsection">
       <xsl:choose>
  @@ -194,6 +240,7 @@
       </table>
     </xsl:template>
   
  +
     <!-- Process a tag library section -->
     <xsl:template match="taglib">
       <table border="0" cellspacing="5" cellpadding="5" width="100%">
  @@ -290,6 +337,13 @@
       </td></tr>
     </xsl:template>
   
  +
  +  <!-- Process an tag info section -->
  +  <xsl:template match="info">
  +     <xsl:apply-templates/>
  +  </xsl:template>
  +  
  +
     <!-- Process a task list section -->
     <xsl:template match="task-list">
       <xsl:choose>
  @@ -321,6 +375,7 @@
       </table>
     </xsl:template>
   
  +
     <!-- Process an individual task (in a TODO list) -->
     <xsl:template match="task">
       <tr>
  @@ -335,6 +390,7 @@
         <td><xsl:value-of select="assigned"/></td>
       </tr>
     </xsl:template>
  +
   
     <!-- Process everything else by just passing it through -->
     <xsl:template match="*|@*">
  
  
  
  1.2       +4 -5      jakarta-struts/doc/tiles/installation.xml
  
  Index: installation.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-struts/doc/tiles/installation.xml,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- installation.xml  6 Jul 2002 01:36:04 -0000       1.1
  +++ installation.xml  8 Sep 2003 01:35:53 -0000       1.2
  @@ -1,12 +1,11 @@
  -
  -     <!-- <?xml version="1.0"?> -->
  -     <document url="./installation.xml">
  -     <properties>
  +<?xml version="1.0"?>
  +  <document url="./installation.xml">
  +  <properties>
        <author>Craig R. McClanahan</author>
        <author>Martin Cooper</author>
        <author>Ted Husted</author>
        <author>Cedric Dumoulin</author>
  -  <title>The Tiles 1.1 Framework Project - Installation (1.1)</title>
  +    <title>The Tiles 1.1 Framework Project - Installation (1.1)</title>
     </properties>
   
     <body>
  
  
  
  1.1                  jakarta-struts/doc/tiles/project.xml
  
  Index: project.xml
  ===================================================================
  <?xml version="1.0" encoding="ISO-8859-1"?>
  <project name="Apache Struts Web Application Framework"
           href="http://jakarta.apache.org/struts";
          image="images/struts.gif">
  
      <title>The Tiles 1.1 Framework Project - Installation (1.1)</title>
  
      <menu name="Tiles">
          <item href="index.jsp" name="Tiles Home"/>
      </menu>
  
      <menu name="Examples">
          <item href="examples/index.jsp" name="Home"/>
      </menu>
  
      <menu name="Documentation">
          <item href="doc/index.jsp" name="Home"/>
          <item href="examples/index.jsp" name="Examples"/>
          <item href="test/quickOverview.jsp" name="Quick overview"/>
          <item href="doc/index.jsp" name="Home"/>
          <item href="tutorial/index.jsp" name="Tutorial Live Examples"/>
      </menu>
  
  </project>
  
  
  
  
  
  
  
  
  
  1.21      +74 -42    jakarta-struts/build-webapps.xml
  
  Index: build-webapps.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-struts/build-webapps.xml,v
  retrieving revision 1.20
  retrieving revision 1.21
  diff -u -r1.20 -r1.21
  --- build-webapps.xml 8 Jul 2003 00:30:33 -0000       1.20
  +++ build-webapps.xml 8 Sep 2003 01:35:53 -0000       1.21
  @@ -173,49 +173,99 @@
           The "compile" target causes non-generic compile activity required
           for specific tag libraries to be executed.
   -->
  -<target name="compile" depends="compile.generic"
  +<target name="compile" depends="compile.generic,compile.docs"
           description="Compile individual web applications">
  +
  +    <!-- Create the Tiles documentation -->
  +    <style   basedir="${doc.dir}/tiles"
  +             destdir="${build.home}/tiles-documentation"
  +           extension=".html" style="${doc.dir}/stylesheets/struts.xsl"
  +            includes="*.xml"
  +            excludes="project.xml">
  +      <param name="relative-path" expression="."/>
  +      <param name="project-path" expression="../tiles/project.xml"/>
  +    </style>            
  +
  +    <!-- Copy the tiles documentation files -->
  +    <copy      todir="${build.home}/tiles-documentation">
  +      <fileset   dir="${doc.dir}">
  +        <include name="**/*.css"/>
  +        <include name="**/*.gif"/>
  +        <include name="**/*.html"/>
  +        <include name="**/*.jpg"/>
  +        <include name="**/*.js"/>
  +      </fileset>
  +    </copy>
  +
  +    <!-- Compile Tiles contrib -->
  +    <!--
  +    <ant  antFile="build.xml"  dir="contrib/tiles"  target="compile.for.struts">
  +      <property name="struts.home"      value="${struts.home}"/>
  +      <property name="struts.libs"      value="${struts.libs}"/>
  +      <property name="build.home"       value="${build.home}/tiles"/>
  +      <property name="dist.home"        value="${dist.home}"/>
  +      <property name="app.name"         value="tiles"/>
  +      <property name="project.name"     value="Tiles"/>
  +    </ant>  
  +    -->
  +    
  +    
  +</target>
  +
  +
  +<!--
  +        The "compile.docs" target transforms the documentation using XSLT
  +-->
  +<target name="compile.docs" 
  +        description="Perform XSLT transformations">
       <!-- Create the taglib documentation -->
       <style   basedir="${doc.dir}" destdir="${build.home}/documentation"
              extension=".html" style="${doc.dir}/stylesheets/struts.xsl"
  -            includes="*.xml"/>
  +            includes="*.xml"
  +            excludes="project.xml">
  +      <param name="relative-path" expression="."/>
  +    </style>            
       <!-- Create the FAQs -->
       <style   basedir="${doc.dir}/faqs"
                destdir="${build.home}/documentation/faqs"
  -           extension=".html" style="${doc.dir}/stylesheets/faqs.xsl"
  -            includes="*.xml"/>
  +           extension=".html" style="${doc.dir}/stylesheets/struts.xsl"
  +            includes="*.xml"
  +            excludes="project.xml">
  +      <param name="project-path" expression="../faqs/project.xml"/>
  +    </style>            
       <!-- Create the news -->
       <style   basedir="${doc.dir}/news"
                destdir="${build.home}/documentation/news"
  -           extension=".html" style="${doc.dir}/stylesheets/news.xsl"
  -            includes="*.xml"/>
  +           extension=".html" style="${doc.dir}/stylesheets/struts.xsl"
  +            includes="*.xml"
  +            excludes="project.xml">
  +      <param name="project-path" expression="../news/project.xml"/>
  +    </style>            
       <!-- Create the proposals -->
       <style   basedir="${doc.dir}/proposals"
                destdir="${build.home}/documentation/proposals"
  -           extension=".html" style="${doc.dir}/stylesheets/proposals.xsl"
  -            includes="*.xml"/>
  +           extension=".html" style="${doc.dir}/stylesheets/struts.xsl"
  +            includes="*.xml"
  +            excludes="project.xml">
  +      <param name="project-path" expression="../proposals/project.xml"/>
  +    </style>            
       <!-- Create the resources -->
       <style   basedir="${doc.dir}/resources"
                destdir="${build.home}/documentation/resources"
  -           extension=".html" style="${doc.dir}/stylesheets/resources.xsl"
  -            includes="*.xml"/>
  +           extension=".html" style="${doc.dir}/stylesheets/struts.xsl"
  +            includes="*.xml"
  +            excludes="project.xml">
  +      <param name="project-path" expression="../resources/project.xml"/>
  +    </style>            
       <!-- Create the user guide -->
  -    <!--   ... browser version ... -->
       <style   basedir="${doc.dir}/userGuide"
                destdir="${build.home}/documentation/userGuide"
  -           extension=".html" style="../stylesheets/userGuide.xsl"
  -            includes="*.xml">
  -      <param name="relative-path" expression=".."/>
  -    </style>
  -    <!--   ... printer version ... -->
  -    <mkdir       dir="${build.home}/documentation/userGuide/printer"/>
  -    <style   basedir="${doc.dir}/userGuide"
  -             destdir="${build.home}/documentation/userGuide/printer"
  -           extension=".html" style="../stylesheets/userGuide.xsl"
  -            includes="*.xml">
  -      <param name="relative-path" expression="../.."/>
  -      <param name="project-menu" expression="nomenu"/>
  -    </style>
  +           extension=".html" style="${doc.dir}/stylesheets/struts.xsl"
  +            includes="*.xml"
  +            excludes="project.xml">
  +      <param name="project-path" expression="../userGuide/project.xml"/>
  +    </style>  
  +
       <!-- Copy the basic documentation files -->
       <copy      todir="${build.home}/documentation">
         <fileset   dir="${doc.dir}">
  @@ -246,26 +296,8 @@
           <include name="**/*.js"/>
         </fileset>
       </copy>
  -    <!-- Create the Tiles documentation -->
  -    <style   basedir="${doc.dir}/tiles"
  -             destdir="${build.home}/tiles-documentation"
  -           extension=".html" style="${doc.dir}/stylesheets/tiles.xsl"
  -            includes="*.xml"/>
       
  -    <!-- Compile Tiles contrib -->
  -<!--
  -    <ant  antFile="build.xml"  dir="contrib/tiles"  target="compile.for.struts">
  -      <property name="struts.home"      value="${struts.home}"/>
  -      <property name="struts.libs"      value="${struts.libs}"/>
  -      <property name="build.home"       value="${build.home}/tiles"/>
  -      <property name="dist.home"        value="${dist.home}"/>
  -      <property name="app.name"         value="tiles"/>
  -      <property name="project.name"     value="Tiles"/>
  -    </ant>  
  --->
  -
   </target>
  -
   
   <!--
           The "dist.generic" target causes the "dist" target of each
  
  
  
  1.121     +1 -90     jakarta-struts/build.xml
  
  Index: build.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-struts/build.xml,v
  retrieving revision 1.120
  retrieving revision 1.121
  diff -u -r1.120 -r1.121
  --- build.xml 28 Aug 2003 01:51:23 -0000      1.120
  +++ build.xml 8 Sep 2003 01:35:53 -0000       1.121
  @@ -789,96 +789,7 @@
   <target name="clean.website" depends="clean,compile.website"/>
   <target name="compile.website"
           description="Compile main website">
  -    <!-- Create the taglib documentation -->
  -    <style   basedir="${doc.dir}" destdir="${build.home}/documentation"
  -           extension=".html" style="${doc.dir}/stylesheets/struts.xsl" 
includes="*.xml"/>
  -    <!-- Create the faqs -->
  -    <style   basedir="${doc.dir}/faqs"
  -             destdir="${build.home}/documentation/faqs"
  -           extension=".html" style="${doc.dir}/stylesheets/faqs.xsl"
  -            includes="*.xml"/>
  -    <!-- Create the news -->
  -    <style   basedir="${doc.dir}/news"
  -             destdir="${build.home}/documentation/news"
  -           extension=".html" style="${doc.dir}/stylesheets/news.xsl"
  -            includes="*.xml"/>
  -    <!-- Create the proposals -->
  -    <style   basedir="${doc.dir}/proposals"
  -             destdir="${build.home}/documentation/proposals"
  -           extension=".html" style="${doc.dir}/stylesheets/proposals.xsl"
  -            includes="*.xml"/>
  -    <!-- Create the resources -->
  -    <style   basedir="${doc.dir}/resources"
  -             destdir="${build.home}/documentation/resources"
  -           extension=".html" style="${doc.dir}/stylesheets/resources.xsl"
  -            includes="*.xml"/>
  -    <!-- Create the user guide -->
  -    <!--   ... browser version ... -->
  -    <style   basedir="${doc.dir}/userGuide"
  -             destdir="${build.home}/documentation/userGuide"
  -           extension=".html" style="${doc.dir}/stylesheets/userGuide.xsl"
  -            includes="*.xml">
  -      <param name="relative-path" expression=".."/>
  -    </style>
  -    <!--   ... printer version ... -->
  -    <mkdir       dir="${build.home}/documentation/userGuide/printer"/>
  -    <style   basedir="${doc.dir}/userGuide"
  -             destdir="${build.home}/documentation/userGuide/printer"
  -           extension=".html" style="${doc.dir}/stylesheets/userGuide.xsl"
  -            includes="*.xml">
  -      <param name="relative-path" expression="../.."/>
  -      <param name="project-menu" expression="nomenu"/>
  -    </style>
  -    <!-- Copy the basic documentation files -->
  -    <copy      todir="${build.home}/documentation">
  -      <fileset   dir="${doc.dir}">
  -        <include name="**/*.css"/>
  -        <include name="**/*.gif"/>
  -        <include name="**/*.html"/>
  -        <include name="**/*.jpg"/>
  -        <include name="**/*.js"/>
  -      </fileset>
  -    </copy>
  -    <!-- Copy the faq files -->
  -    <copy      todir="${build.home}/documentation/faqs">
  -      <fileset   dir="${doc.dir}/faqs">
  -        <include name="**/*.css"/>
  -        <include name="**/*.gif"/>
  -        <include name="**/*.html"/>
  -        <include name="**/*.jpg"/>
  -        <include name="**/*.js"/>
  -      </fileset>
  -    </copy>
  -    <!-- Copy the proposal files -->
  -    <copy      todir="${build.home}/documentation/proposals">
  -      <fileset   dir="${doc.dir}/proposals">
  -        <include name="**/*.css"/>
  -        <include name="**/*.gif"/>
  -        <include name="**/*.html"/>
  -        <include name="**/*.jpg"/>
  -        <include name="**/*.js"/>
  -      </fileset>
  -    </copy>
  -    <!-- Copy the resource files -->
  -    <copy      todir="${build.home}/documentation/resources">
  -      <fileset   dir="${doc.dir}/resources">
  -        <include name="**/*.css"/>
  -        <include name="**/*.gif"/>
  -        <include name="**/*.html"/>
  -        <include name="**/*.jpg"/>
  -        <include name="**/*.js"/>
  -      </fileset>
  -    </copy>
  -    <!-- Copy the basic user guide files -->
  -    <copy      todir="${build.home}/documentation/userGuide">
  -      <fileset   dir="${doc.dir}/userGuide">
  -        <include name="**/*.css"/>
  -        <include name="**/*.gif"/>
  -        <include name="**/*.html"/>
  -        <include name="**/*.jpg"/>
  -        <include name="**/*.js"/>
  -      </fileset>
  -    </copy>
  +        <ant antfile="build-webapps.xml" target="compile.docs"/>
   </target>
   
   
  
  
  
  1.2       +11 -4     jakarta-struts/doc/struts.css
  
  Index: struts.css
  ===================================================================
  RCS file: /home/cvs/jakarta-struts/doc/struts.css,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- struts.css        5 Sep 2003 23:02:41 -0000       1.1
  +++ struts.css        8 Sep 2003 01:35:54 -0000       1.2
  @@ -25,6 +25,7 @@
        font-size: 1.1em;
        font-weight: bold;
   }
  +
   .chapter-title a {
        color: #FFFFFF;
   }
  @@ -36,6 +37,7 @@
        font-size: 1.1em;
        font-weight: bold;
   }
  +
   .section-title a {
        color: #FFFFFF;
   }
  @@ -47,6 +49,7 @@
        font-size: 1em;
        font-weight: bold;
   }
  +
   .subsection-title a {
        color: #FFFFFF;
   }
  @@ -58,22 +61,22 @@
        font-size: 1.1em;
        font-weight: bold;
   }
  +
   .taglib-title a {
        color: #FFFFFF;
   }
   
  -
   .tag-title{
        background: #023264;
        color: #FFFFFF;
        font-family: Arial, Helvetica, sans-serif;
        font-size: medium;
   }
  +
   .tag-title a {
        color: #FFFFFF;
   }
   
  -
   .tasklist{
        background: #023264;
        color: #FFFFFF;
  @@ -95,15 +98,19 @@
   }
   
   .warning {
  -     color: #f00;
  +     color: #FF0000;
        font-weight: bold;
   }
   
  +
   @media print {
   .menu {
        display: none;
   }    
  -#apache-logo {
  +#jakarta-logo {
  +     display: none;
  +}
  +.noprint{
        display: none;
   }
   }
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to