forrest-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From je...@apache.org
Subject cvs commit: xml-forrest/src/resources/skins/forrest-site/xslt/html book2menu.xsl document2html.xsl site2xhtml.xsl tab2menu.xsl
Date Mon, 23 Sep 2002 07:47:42 GMT
jefft       2002/09/23 00:47:41

  Modified:    .        build.build.xml build.sh build.xml
                        forrest.build.xml
               src/resources/conf sitemap.xmap
               src/resources/skins/avalon-site/xslt/html site2xhtml.xsl
               src/resources/skins/forrest-site/scripts breadcrumbs.js
               src/resources/skins/forrest-site/xslt/html book2menu.xsl
                        document2html.xsl site2xhtml.xsl tab2menu.xsl
  Log:
   - Allows users to have a custom sitemap, overriding the forrest-provided one.
     Default location is src/documentation/sitemap.xmap, though it is
     configurable.
  
   - Allows users to add jars to the webapp, by default from
     src/documentation/lib (configurable). This is useful for adding custom
     sitemap components, or testing hacked versions of Cocoon.
  
   - By setting properties in forrest.properties, the user can specify
     where their project's doc files (sitemap, xdocs, images, skins,
     skinconf, lib) are located.
  
   - Modifies the forrest-site skin to be configurable for non-Apache projects.
     Previously there were some xml.apache.org hardcodings. Also enhances
     configurability by:
  	- providing a flag to disable the search box
      - providing a 'host' section in the bottom-left, for things like
        sourceforge logos
      - by providing a 'credits' section where multiple small images can
        link to 'credited' projects.
  
   - Previously, each Forrest-generated page had page-relative links to
     'skins/images/*', and then a sitemap rule eliminated any directory prefix.
     This leads to multiple copies of images on the filesystem:
  
     http://www.outerthought.net/forrest/images/group-logo.gif
     http://www.outerthought.net/forrest/community/howto/images/group-logo.gif
     http://www.outerthought.net/forrest/xml-site/images/group-logo.gif
  
     The patch fixes this by generating a '../' path to the site root, and
     then using the {context-root}/skins/images rule.
  
  Revision  Changes    Path
  1.7       +87 -1     xml-forrest/build.build.xml
  
  Index: build.build.xml
  ===================================================================
  RCS file: /home/cvs/xml-forrest/build.build.xml,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- build.build.xml	9 Sep 2002 14:59:21 -0000	1.6
  +++ build.build.xml	23 Sep 2002 07:47:41 -0000	1.7
  @@ -213,6 +213,7 @@
       <copy todir="${webapp.webinf.dir}" >
         <fileset dir="${resource.dir}/conf" >
           <exclude name="sitemap.xmap" />
  +        <exclude name="skinconf.xml" />
         </fileset>
       </copy>
   
  @@ -255,6 +256,7 @@
       <copy todir="${bare-context.dir}">
         <fileset dir="${resource.dir}/conf">
           <include name="sitemap.xmap"/>
  +        <include name="skinconf.xml"/>
           <!-- this is already in the WEB-INF, the webapp will find it there
                however we need it here in the cocoon CLI mode -->
           <include name="cocoon.xconf"/>
  @@ -358,7 +360,7 @@
     <!-- =================================================================== -->
     <!-- Generate project-site                                               -->
     <!-- =================================================================== -->
  -  <target name="docs" depends="dist-shbat" >
  +  <target name="docs" depends="dist-shbat" description="Generates the documentation">
       <!-- warning to other projects:
          This target is using internally build productions for test.
          This is by no means an example of how you can use it inside your project 
  @@ -448,5 +450,89 @@
     -->
   
       &import-antipede;
  +
  +  <!-- ================================== -->
  +  <!--    Targets for the remote builds   -->
  +  <!-- ================================== -->
  +
  +  <target name="bot.init" depends="init">
  +    <!-- initializes environment to start on bot targets -->
  +    <property name="bot.build.dir"              value="${xlayout.build.bot.dir}"/>
  +    <property name="bot.work.build.xml"         value="${bot.build.dir}/work.build.xml"/>
  +    <property name="bot.default.parameters.xml" value="${bot.build.dir}/default.parameters.xml"/>
  +    <property name="bot.forrestbot.xconf"       value="forrestbot.conf.xml" />
  +    <property file="ant-mail.properties" />
  +    <property name="bot.templates.build.xml"    value="${xlayout.source.resources.forrestbot.ant.dir}/templates.build.xml" />
  +    <property name="bot.work.builder.xslt"      value="${xlayout.source.resources.forrestbot.xslt.dir}/config2work.xsl" />
  +    <property name="bot.default.builder.xslt"   value="${xlayout.source.resources.forrestbot.xslt.dir}/config2defaults.xsl" />
  +    <mkdir dir="${bot.build.dir}" />
  +    <echo message="Using config file: ${bot.forrestbot.xconf}" />
  +  </target>
  +
  +  <target name="bot.conf2build" depends="bot.init" >
  +		<!-- remove previous versions to force generation again -->
  +		<delete file="${bot.work.build.xml}" />
  +		<delete file="${bot.default.parameters.xml}" />
  +
  +    <!-- builds the different xml files this process needs.  -->
  +    <style in="${bot.forrestbot.xconf}"
  +       out="${bot.work.build.xml}"
  +       style="${bot.work.builder.xslt}"/>
  +    <style in="${bot.forrestbot.xconf}"
  +       out="${bot.default.parameters.xml}"
  +       style="${bot.default.builder.xslt}"/>
  +    <copy todir="${bot.build.dir}" file="${bot.templates.build.xml}"/>
  +  </target>
  +
  +  <target name="bot.prepare-cp" depends="bot.init, compile" >
  +    <!-- todo: question if it is good practice to share WEB-INF classes -->
  +    <mkdir dir="${bot.build.dir}/WEB-INF/classes"/>
  +    <copy todir="${bot.build.dir}/WEB-INF/classes">
  +      <fileset dir="${resource.dir}/schema">
  +        <include name="CatalogManager.properties"/>
  +      </fileset>
  +      <fileset dir="${build.dest}">
  +        <include name="**/*.class"/>
  +      </fileset>
  +      <fileset dir="${build.scratchpad.dest}">
  +        <include name="**/*.class"/>
  +      </fileset>
  +    </copy>
  +
  +    <path id="forrest.cp">
  +      <path refid="classpath"/>
  +      <fileset dir="${build.dir}">
  +        <include name="*.jar"/>
  +      </fileset>
  +      <fileset dir="${tools.dir}">
  +        <include name="*/lib/*.jar"/>
  +      </fileset>
  +      <pathelement location="${tools.jar}"/>
  +      <pathelement location="${bot.build.dir}/WEB-INF/classes"/>
  +    </path>
  +  </target>
  +
  +  <target name="bot.run" depends="bot.conf2build, bot.prepare-cp" >
  +    <!-- delegates to the generated XML file -->
  +    <ant antfile="${bot.work.build.xml}" target="work" inheritRefs="true"/>
  +  </target>
  +
  +  <target name="bot" depends="bot.run" />
  +
  +  <!-- =================================================================== -->
  +  <!-- Import Ant-Centipede init targets - sets up basic build stuff       -->
  +  <!-- =================================================================== -->
  +  <!--
  +        This is the target that initializes tasks and properties used
  +        commonly in every other target.
  +
  +        Remember to add depends="init" to every target, so that this
  +        target is called before any other.
  +
  +        This target is internal; to make it unusable from the commandline,
  +        its name starts with a hyphen.
  +        To make it invisible when using -projecthelp, it lacks a description.
  +  -->
  +
   
   </project>
  
  
  
  1.5       +1 -1      xml-forrest/build.sh
  
  Index: build.sh
  ===================================================================
  RCS file: /home/cvs/xml-forrest/build.sh,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- build.sh	7 Jul 2002 09:47:51 -0000	1.4
  +++ build.sh	23 Sep 2002 07:47:41 -0000	1.5
  @@ -30,7 +30,7 @@
   export CLASSPATH
   
   echo Using classpath: \"$CLASSPATH\"
  -$PWD/./tools/antipede/bin/ant -emacs -logger org.apache.tools.ant.NoBannerLogger $@ 
  +$PWD/./tools/antipede/bin/ant -emacs  $@
   
   unset CLASSPATH
   
  
  
  
  1.23      +2 -1      xml-forrest/build.xml
  
  Index: build.xml
  ===================================================================
  RCS file: /home/cvs/xml-forrest/build.xml,v
  retrieving revision 1.22
  retrieving revision 1.23
  diff -u -r1.22 -r1.23
  --- build.xml	17 Sep 2002 09:20:39 -0000	1.22
  +++ build.xml	23 Sep 2002 07:47:41 -0000	1.23
  @@ -250,10 +250,11 @@
         </fileset>
       </copy>
   
  -    <!-- Copy Cocoon configuration and sitemap -->
  +    <!-- Copy Cocoon configuration, sitemap and skin conf -->
       <copy todir="${build.context}" filtering="on">
         <fileset dir="${documentation.context.dir}/conf">
           <include name="sitemap.xmap"/>
  +        <include name="skinconf.xml"/>
           <include name="cocoon.xconf"/>
           <include name="logkit.xconf"/>
         </fileset>
  
  
  
  1.8       +152 -36   xml-forrest/forrest.build.xml
  
  Index: forrest.build.xml
  ===================================================================
  RCS file: /home/cvs/xml-forrest/forrest.build.xml,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- forrest.build.xml	9 Sep 2002 14:59:21 -0000	1.7
  +++ forrest.build.xml	23 Sep 2002 07:47:41 -0000	1.8
  @@ -39,17 +39,18 @@
          Steps back to defaults when they are not set.
          Echo's the settings if requested.
          =============================================================== -->
  -  <target name="init">
  +  <target name="init-props">
     
       <!-- setting defaults for parameters -->
       <!-- people should use -D switch, or <ant><property>s to override these   -->
  -    <property name="forrest.home" location="." />
  +
       <property name="project.home" location="." />
   
  -    <!-- people should use forrest.properties to override following defaults  -->
       <echo message="Loading project specific properties from ${project.home}/forrest.properties" />
       <property file="${project.home}/forrest.properties" />
   
  +    <!-- people should use forrest.properties to override following defaults  -->
  +    <property name="forrest.home"        location="." />
       <property name="project.site-dir"    value="${project.home}/build/site"    />
       <property name="project.war"         value="${project.home}/build/my-project.war" />
       <property name="project.webapp"      value="${project.home}/build/webapp" />
  @@ -70,16 +71,52 @@
   
       <!-- use of these property should be removed when the siteplan becomes active -->
       <property name="project.skin"        value="forrest-site" />
  +    <property name="project.status"      value="${project.home}/status.xml" />
       <property name="project.content-dir" value="${project.home}/src/documentation" />
  +    <property name="project.sitemap"     value="${project.content-dir}/sitemap.xmap" />
  +    <property name="project.xdocs-dir"   value="${project.content-dir}/content/xdocs" />
  +    <property name="project.stylesheets-dir" value="${project.content-dir}/resources/stylesheets" />
  +    <property name="project.images-dir"  value="${project.content-dir}/resources/images" />
  +    <property name="project.schema-dir" value="${project.content-dir}/resources/schema" />
  +    <property name="project.skins-dir"   value="${project.content-dir}/skins" />
  +    <property name="project.skinconf"    value="${project.content-dir}/skinconf.xml" />
  +    <available property="project.skinconf.present" file="${project.skinconf}" type="file"/>
  +    <property name="project.lib-dir"     value="${project.content-dir}/lib" />
  +    <property name="project.classes-dir" value="${project.content-dir}/classes" />
   
       <!-- checks for presence of required classes and/or resources -->
  -    <property name="tools.jar"             location="${java.home}/../lib/tools.jar"/>
  -    <available file="${tools.jar}"         property="tools.jar.present"/>
  -    
  +    <property name="tools.jar"           location="${java.home}/../lib/tools.jar"/>
  +    <available file="${tools.jar}"       property="tools.jar.present"/>
  +
       <!-- echo settings in -Dforrest.echo=true mode -->
       <antcall target="echo-settings" />
  +
  +  </target>
  +
  +  <!-- Load properties from user's skinconf.xml, if it is defined -->
  +  <target name="load-project-props" depends="init-props" if="project.skinconf.present">
  +    <xmlproperty file="${project.skinconf}" collapseattributes="true"
  +      validate="true"/>
  +  </target>
  +
  +  <!-- Load properties from Forrest's default skinconf.xml, unless a user's is defined -->
  +  <target name="load-forrest-props" depends="init-props" unless="project.skinconf.present">
  +    <xmlproperty file="${forrest.home}/context/skinconf.xml"
  +      collapseattributes="true" validate="true"/>
  +  </target>
  +
  +  <!-- Define filters equating to elements in the skinconf.xml file. Skins can
  +  include tokens corresponding to skinconf.xml elements, and have them replaced
  +  at runtime.-->
  +  <target name="init-skinprops" depends="load-project-props, load-forrest-props">
  +    <mkdir dir="${project.temp-dir}"/>
  +    <property name="skinfilters" value="${project.temp-dir}/skinfilters.properties"/>
  +    <echoproperties prefix="skinconfig" destfile="${skinfilters}"/>
  +    <filter filtersfile="${skinfilters}"/>
     </target>
   
  +  <target name="init" depends="init-props, init-skinprops" description="Sets up
  +    properties and filters"/>
   
     <!-- ===============================================================
          Echo's the settings if requested. [-Dforrest.echo=true]
  @@ -127,11 +164,13 @@
     <!-- ===============================================================
          Set class-path.
          =============================================================== -->
  -  <target name="prepare-classpath" depends="init" >
  +  <target name="prepare-classpath" depends="prepare-context" >
       <path id="forrest.cp">
  +      <pathelement location="${project.ctxt-dir}/WEB-INF/classes"/>
  +      <fileset dir="${project.ctxt-dir}/WEB-INF/lib" includes="*.jar"/>
  +      <pathelement location="${forrest.home}/WEB-INF/classes"/>
         <fileset dir="${forrest.home}/WEB-INF/lib" includes="*.jar" />
         <pathelement location="${tools.jar}"/>
  -      <pathelement location="${forrest.home}/WEB-INF/classes"/>
       </path>
     </target>
   
  @@ -199,25 +238,27 @@
          param: location to make temporary context-dir ${project.ctxt-dir} 
          =============================================================== -->
     <target name="bare-context" depends="init" >
  -    <!-- TODO get rid of this hackerism -->
  -    <!-- The birth of the siteplan could help in getting rid of these -->
       <filter token="skin"              value="${project.skin}" />
  -    <filter token="link1"             value="apache"/>
  -    <filter token="link1.href"        value="http://www.apache.org/"/>
  -    <filter token="link2"             value="xml.apache"/>
  -    <filter token="link2.href"        value="http://xml.apache.org/"/>
  -    <!-- the breadcrumb script already generates it,
  -         so it needs to be kept blank -->
  -    <filter token="link3"             value=""/>
  -    <filter token="link3.href"        value=""/>
  -    <filter token="group-logo.src"    value="images/group-logo.gif"/>
  -    <filter token="group-logo.href"   value="http://xml.apache.org/"/>
  -    <filter token="group-logo.alt"    value="Apache XML logo"/>
  -    <filter token="project-logo.src"  value="images/project-logo.gif"/>
  -    <filter token="project-logo.href" value="http://xml.apache.org/forrest/"/>
  -    <filter token="project-logo.alt"  value="Forrest logo"/>
  -    <filter token="year"              value="2002"/>
  -    <filter token="vendor"            value="Apache Sofware Foundation"/>
  +
  +    <!--
  +    These filters defined for backwards-compatibility with old skins.
  +    New skins should use the skinconfig.* filters, or actively parse the
  +    skinconf.xml file themselves. (JT)
  +    -->
  +    <filter token="link1"      value="${skinconfig.trail.link1.name}"/>
  +    <filter token="link1.href" value="${skinconfig.trail.link1.href}"/>
  +    <filter token="link2"      value="${skinconfig.trail.link2.name}"/>
  +    <filter token="link2.href" value="${skinconfig.trail.link2.href}"/>
  +    <filter token="link3"      value="${skinconfig.trail.link3.name}"/>
  +    <filter token="link3.href" value="${skinconfig.trail.link3.href}"/>
  +    <filter token="year"       value="${skinconfig.year}"/>
  +    <filter token="vendor"     value="${skinconfig.vendor}"/>
  +    <filter token="group-logo.src"  value="${skinconfig.group-logo}"/>
  +    <filter token="group-logo.href" value="${skinconfig.group-url}"/>
  +    <filter token="group-logo.alt"  value="${skinconfig.group-name} logo"/>
  +    <filter token="project-logo.src"  value="${skinconfig.project-logo}"/>
  +    <filter token="project-logo.href" value="${skinconfig.project-url}"/>
  +    <filter token="project-logo.alt"  value="${skinconfig.project-name} logo"/>
   
       <!-- NOW: filter-copy the empty-forrest-context -->
       <!-- WITH SitePlan: smaller empty-context, 1 unfiltered copy
  @@ -241,6 +282,10 @@
           <exclude name="skins/**/images/**" />
         </fileset>
       </copy>
  +    <!--Hack to stop the classpath definition breaking. If the project has any
  +    custom jars or classes, they will be added to these dirs -->
  +    <mkdir dir="${project.ctxt-dir}/WEB-INF/lib"/>
  +    <mkdir dir="${project.ctxt-dir}/WEB-INF/classes"/>
     </target>
   
   
  @@ -254,17 +299,87 @@
          param: location to find project descriptors == ${project.home} 
          param: location to make temporary context-dir ${project.ctxt-dir} 
          =============================================================== -->
  -  <target name="project-context" depends="init, bare-context" >
  -    <copy toDir="${project.ctxt-dir}/" >
  -      <fileset dir="${project.content-dir}" />
  -    </copy>
  -    <copy todir="${project.ctxt-dir}" >
  -      <fileset dir="${project.home}">
  -        <include name="*.*ml"/>
  -      </fileset>
  +  <target name="project-context" depends="init, bare-context, examine-proj, copy-sitemap,
  +    copy-xdocs, copy-stylesheets, copy-images, copy-schema, copy-lib,
  +    copy-classes, copy-skins, copy-skinconf, copy-status"/>
  +
  +  <target name="examine-proj">
  +    <available property="sitemap.present" file="${project.sitemap}"/>
  +    <available property="xdocs.present" file="${project.xdocs-dir}" type="dir"/>
  +    <available property="images.present" file="${project.images-dir}" type="dir"/>
  +    <available property="schema.present" file="${project.schema-dir}" type="dir"/>
  +    <available property="stylesheets.present" file="${project.stylesheets-dir}" type="dir"/>
  +    <available property="lib.present" file="${project.lib-dir}" type="dir"/>
  +    <available property="classes.present" file="${project.classes-dir}" type="dir"/>
  +    <available property="skins.present" file="${project.skins-dir}" type="dir"/>
  +    <available property="skinconf.present" file="${project.skinconf}"/>
  +    <available property="status.present" file="${project.status}"/>
  +  </target>
  +
  +  <target name="copy-sitemap" if="sitemap.present">
  +    <copy file="${project.sitemap}" toDir="${project.ctxt-dir}" filtering="true"
  +      overwrite="true" failonerror="false"/>
  +  </target>
  +
  +  <target name="copy-xdocs" if="xdocs.present">
  +    <copy toDir="${project.ctxt-dir}/content/xdocs" filtering="false"
  +      overwrite="true">
  +      <fileset dir="${project.xdocs-dir}"/>
  +    </copy>
  +  </target>
  +
  +  <target name="copy-stylesheets" if="stylesheets.present">
  +    <copy toDir="${project.ctxt-dir}/resources/stylesheets" filtering="false"
  +      overwrite="true" failonerror="false">
  +      <fileset dir="${project.stylesheets-dir}"/>
  +    </copy>
  +  </target>
  +
  +  <target name="copy-images" if="images.present">
  +    <copy toDir="${project.ctxt-dir}/resources/images" filtering="false"
  +      overwrite="true" failonerror="false">
  +      <fileset dir="${project.images-dir}"/>
       </copy>
     </target>
  -  
  +
  +  <target name="copy-schema" if="schema.present">
  +    <echo>Copying schemas..</echo>
  +    <copy toDir="${project.ctxt-dir}/resources/schema" filtering="false"
  +      overwrite="true" failonerror="false">
  +      <fileset dir="${project.schema-dir}"/>
  +    </copy>
  +  </target>
  +
  +  <target name="copy-lib" if="lib.present">
  +    <copy toDir="${project.ctxt-dir}/WEB-INF/lib" filtering="false"
  +      overwrite="true" failonerror="false">
  +      <fileset dir="${project.lib-dir}"/>
  +    </copy>
  +  </target>
  +
  +  <target name="copy-classes" if="classes.present">
  +    <copy toDir="${project.ctxt-dir}/WEB-INF/classes" filtering="false"
  +      overwrite="true" failonerror="false">
  +      <fileset dir="${project.classes-dir}"/>
  +    </copy>
  +  </target>
  +
  +  <target name="copy-skins" if="skins.present">
  +    <copy toDir="${project.ctxt-dir}/skins" filtering="true" overwrite="true" failonerror="false">
  +      <fileset dir="${project.skins-dir}"/>
  +    </copy>
  +  </target>
  +
  +  <target name="copy-skinconf" if="skinconf.present">
  +    <copy file="${project.skinconf}"
  +      toDir="${project.ctxt-dir}" filtering="false"
  +      overwrite="true" failonerror="false"/>
  +  </target>
  +
  +  <target name="copy-status" if="status.present">
  +    <copy file="${project.status}" todir="${project.ctxt-dir}" filtering="false"/>
  +  </target>
  +
   
     <!-- ===============================================================
          Makes the Cocoon context dir to work in and fills it completely.
  @@ -397,9 +512,10 @@
          className="org.apache.xerces.parsers.SAXParser"
          classpathref="forrest.cp">
          <fileset dir="${project.ctxt-dir}">
  +         <include name="content/xdocs/*.xml"/>
            <include name="*.x*" />
            <exclude name="*build.xml"/>
  -      </fileset>
  +       </fileset>
       </xmlvalidate>
     </target>
   
  
  
  
  1.18      +39 -10    xml-forrest/src/resources/conf/sitemap.xmap
  
  Index: sitemap.xmap
  ===================================================================
  RCS file: /home/cvs/xml-forrest/src/resources/conf/sitemap.xmap,v
  retrieving revision 1.17
  retrieving revision 1.18
  diff -u -r1.17 -r1.18
  --- sitemap.xmap	16 Sep 2002 23:34:25 -0000	1.17
  +++ sitemap.xmap	23 Sep 2002 07:47:41 -0000	1.18
  @@ -29,6 +29,7 @@
         <use-request-parameters>false</use-request-parameters>
         <use-browser-capabilities-db>false</use-browser-capabilities-db>
         <use-deli>false</use-deli>
  +      <!-- transformer-factory>com.icl.saxon.TransformerFactoryImpl</transformer-factory -->
         <!-- transformer-factory>org.apache.xalan.xsltc.trax.TransformerFactoryImpl</transformer-factory -->
       </map:transformer>
     </map:transformers>
  @@ -81,8 +82,7 @@
       <map:action logger="sitemap.action.request" name="request" src="org.apache.cocoon.acting.RequestParamAction"/>
     </map:actions-->
   
  -
  -    <!--
  +  <!--
        The different pipeline implementations
     -->
     <map:pipelines default="caching">
  @@ -113,7 +113,11 @@
     <map:resource name="skinit">
      <map:transform src="skins/{defaults:skin}/xslt/html/{type}.xsl">
        <map:parameter name="isfaq" value="{isfaq}"/>
  +     <map:parameter name="dir" value="{dir}"/>
        <map:parameter name="resource" value="{resource}"/>
  +     <!-- Can set an alternative project skinconfig here 
  +     <map:parameter name="config-file" value="../../../../skinconf.xml"/>
  +     -->
      </map:transform>
      <map:serialize/>
     </map:resource>
  @@ -156,6 +160,7 @@
       <map:call resource="skinit">
        <map:parameter name="type" value="tab2menu"/>
        <map:parameter name="resource" value="{1}"/>
  +     <map:parameter name="dir" value="{1}/"/>
       </map:call>
     </map:match>
   
  @@ -175,7 +180,9 @@
        <map:generate type="file-nolabel" src="status.xml"/>
        <map:transform src="library/xslt/todo2document.xsl" label="content"/>
        <map:call resource="skinit">
  -      <map:parameter name="type" value="document2html"/>      <map:parameter name="resource" value="todo"/>
  +      <map:parameter name="type" value="document2html"/>
  +      <map:parameter name="resource" value="todo"/>
  +      <map:parameter name="dir" value=""/>
        </map:call>
      </map:match>
   
  @@ -183,7 +190,9 @@
        <map:generate type="file-nolabel" src="status.xml"/>
        <map:transform src="library/xslt/changes2document.xsl" label="content"/>
        <map:call resource="skinit">
  -      <map:parameter name="type" value="document2html"/>      <map:parameter name="resource" value="changes"/>
  +      <map:parameter name="type" value="document2html"/>
  +      <map:parameter name="resource" value="changes"/>
  +      <map:parameter name="dir" value=""/>
        </map:call>
      </map:match>
   
  @@ -191,7 +200,9 @@
        <map:generate type="file-nolabel" src="content/xdocs/faq.xml"/>
        <map:transform src="library/xslt/faq2document.xsl" label="content"/>
        <map:call resource="skinit">
  -      <map:parameter name="type" value="document2html"/>      <map:parameter name="resource" value="faq"/>
  +      <map:parameter name="type" value="document2html"/>
  +      <map:parameter name="resource" value="faq"/>
  +      <map:parameter name="dir" value=""/>
         <map:parameter name="isfaq" value="true"/>
   
        </map:call>
  @@ -201,7 +212,9 @@
      <map:match pattern="body-community/*/index.xml">
        <map:generate src="content/xdocs/community/{1}/index.xml"/>
        <map:call resource="skinit">
  -      <map:parameter name="type" value="document2html"/>      <map:parameter name="resource" value="{1}"/>
  +      <map:parameter name="type" value="document2html"/>
  +      <map:parameter name="resource" value="{1}"/>
  +      <map:parameter name="dir" value="community/{1}/"/>
        </map:call>
      </map:match>
   
  @@ -209,7 +222,9 @@
      <map:match pattern="body-community**revision-*.xml">
        <map:generate src="content/xdocs/community{1}revision-{2}.xml"/>
        <map:call resource="skinit">
  -      <map:parameter name="type" value="document2html"/>      <map:parameter name="resource" value="{1}"/>
  +      <map:parameter name="type" value="document2html"/>
  +      <map:parameter name="resource" value="{1}"/>
  +      <map:parameter name="dir" value="community/{1}/"/>
        </map:call>
      </map:match>
   
  @@ -221,7 +236,9 @@
        </map:aggregate>
        <map:transform src="library/xslt/{1}2document.xsl" label="content"/>
        <map:call resource="skinit">
  -      <map:parameter name="type" value="document2html"/>      <map:parameter name="resource" value="{3}"/>
  +      <map:parameter name="type" value="document2html"/>
  +      <map:parameter name="resource" value="{3}"/>
  +      <map:parameter name="dir" value="community/{1}/{2}/"/>
        </map:call>
      </map:match>
   
  @@ -257,6 +274,7 @@
        <map:transform src="library/xslt/doclist2document.xsl"/>
        <map:call resource="skinit">
         <map:parameter name="type" value="document2html"/>
  +      <map:parameter name="dir" value="community/{1}/{2}/"/>
        </map:call>
      </map:match>
   
  @@ -270,14 +288,18 @@
        <map:transform src="library/xslt/flat2document.xsl"/>
        <map:call resource="skinit">
         <map:parameter name="type" value="document2html"/>
  -      <map:parameter name="isfaq" value="true"/>      <map:parameter name="resource" value="{1}.dtdx"/>
  +      <map:parameter name="isfaq" value="true"/>
  +      <map:parameter name="resource" value="{1}.dtdx"/>
  +      <map:parameter name="dir" value="{1}"/>
        </map:call>
      </map:match>
   
      <map:match pattern="body-**.xml">
        <map:generate src="content/xdocs/{1}.xml"/>
        <map:call resource="skinit">
  -      <map:parameter name="type" value="document2html"/>      <map:parameter name="resource" value="{1}"/>
  +      <map:parameter name="type" value="document2html"/>
  +      <map:parameter name="resource" value="{1}"/>
  +      <map:parameter name="dir" value="{1}"/>
        </map:call>
      </map:match>
   
  @@ -289,6 +311,7 @@
       </map:aggregate>
       <map:call resource="skinit">
         <map:parameter name="type" value="site2xhtml"/>
  +      <map:parameter name="dir" value=""/>
       </map:call>
      </map:match>
   
  @@ -300,6 +323,7 @@
       </map:aggregate>
        <map:call resource="skinit">
         <map:parameter name="type" value="site2xhtml"/>
  +      <map:parameter name="dir" value="{1}/"/>
        </map:call>
      </map:match>
   
  @@ -395,6 +419,10 @@
       </map:call>
      </map:match>
   
  +   <!-- WARNING: You are strongly advised not to make use of this target, as it
  +   leads to browsers having to cache multiple copies of the images, one per
  +   directory. See the forrest-site skin XSLTs for an example of how to make
  +   all image references use the 'skin/images/**.*' rule above -->
      <map:match pattern="**/skin/images/**.*">
       <map:call resource="skin-read">
         <map:parameter name="path" value="images/{2}.{3}"/>
  @@ -411,6 +439,7 @@
       <map:read src="resources/images/{1}.{2}" mime-type="image/{2}"/>
      </map:match>
   
  +   <!-- WARNING: See above: this target should not be made use of -->
      <map:match pattern="**/images/**.*">
       <map:read src="resources/images/{2}.{3}" mime-type="image/{3}"/>
      </map:match>
  
  
  
  1.3       +68 -8     xml-forrest/src/resources/skins/avalon-site/xslt/html/site2xhtml.xsl
  
  Index: site2xhtml.xsl
  ===================================================================
  RCS file: /home/cvs/xml-forrest/src/resources/skins/avalon-site/xslt/html/site2xhtml.xsl,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- site2xhtml.xsl	3 Jun 2002 17:26:06 -0000	1.2
  +++ site2xhtml.xsl	23 Sep 2002 07:47:41 -0000	1.3
  @@ -1,8 +1,23 @@
   <?xml version="1.0"?>
   
   <xsl:stylesheet
  -    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  -    version="1.0">
  +	xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  +	version="1.0">
  +	<!-- Default skinconf.xml in the skins/ directory -->
  +	<xsl:param name="config-file" select="'../../../../skinconf.xml'"/>
  +	<xsl:variable name="config" select="document($config-file)/skinconfig"/>
  +	<xsl:param name="dir" select="'UNDEFINED'"/>
  +	<xsl:include href="dotdots.xsl"/>
  +
  +	<xsl:variable name="root">
  +		<xsl:call-template name="dotdots">
  +		<xsl:with-param name="path" select="$dir"/>
  +		</xsl:call-template>
  +	</xsl:variable>
  +
  +	<xsl:variable name="skin-img-dir" select="concat(string($root), 'skin/images')"/>
  +	<xsl:variable name="spacer" select="concat($root, 'skin/images/spacer.gif')"/>
  +
   <xsl:template match="/">
   <html>
   <head>
  @@ -16,16 +31,26 @@
   			<!-- header -->
   			<div id="header"><table width="100%" border="0" cellpadding="0" cellspacing="0">
   						<tr>
  -									<td id="jakartaLogoTD" valign="middle" align="left"><a href="@group-logo.href@"><img id="jakartaLogo" src="@group-logo.src@" border="0"/></a></td>
  -									<td id="projectLogoTD" valign="middle" align="right"><a href="@project-logo.href@"><img id="projectLogo" src="@project-logo.src@" border="0"/></a></td>
  +							<td id="jakartaLogoTD" valign="middle" align="left">
  +							<xsl:if test="$config/group-url">
  +									<a href="{$config/group-url}"><img id="jakartaLogo" src="{$config/group-logo}" border="0" alt="{$config/group-name} logo"/></a>
  +							</xsl:if>
  +							</td>
  +									<td id="projectLogoTD" valign="middle" align="right"><a href="{$config/project-url}"><img id="projectLogo" src="{$config/project-logo}" border="0" alt="{$config/project-name}"/></a></td>
   						</tr>
   			</table></div>
   			<!-- end header -->
   			<!-- breadcrumb trail (javascript-generated) -->
   			<div id="breadcrumbs">
  -              <a href="@link1.href@" class="menu">@link1@ &gt;</a>
  -              <a href="@link2.href@" class="menu">@link2@ &gt;</a>
  -              <a href="@link3.href@" class="menu">@link3@</a>    			
  +			<xsl:if test="not($config/trail/link1/@name = '')">
  +				<a href="{$config/trail/link1/@name}" class="menu"><xsl:value-of select="$config/trail/link1/@name"/> &gt;</a>
  +			</xsl:if>
  +			<xsl:if test="not($config/trail/link2/@name = '')">
  +				<a href="{$config/trail/link2/@name}" class="menu"><xsl:value-of select="$config/trail/link2/@name"/> &gt;</a>
  +			</xsl:if>
  +			<xsl:if test="not($config/trail/link3/@name = '')">
  +				<a href="{$config/trail/link3/@name}" class="menu"><xsl:value-of select="$config/trail/link3/@name"/></a>
  +			</xsl:if>
   				<script language="JavaScript1.2" type="text/javascript">
   				<!--
   					function sentenceCase(str) {
  @@ -81,9 +106,44 @@
   			<!-- end main section of page -->
   			<!-- footer -->
   			<div id="footer">
  -						 Copyright &#x00A9;@year@ @vendor@. All Rights Reserved.
  +						 Copyright &#x00A9;<xsl:value-of select="$config/year"/>&#160;<xsl:value-of
  +          select="$config/vendor"/>  All Rights Reserved.
   
   			</div>
  +    <table>
  +      <tr>
  +      <td class="logos" bgcolor="#CFDCED" colspan="1" align="left">
  +        <xsl:if test="$config/host-logo and not($config/host-logo = '')">
  +            <a href="{$config/host-url}"><img src="{$config/host-logo}" alt="{$config/host-name} logo" border="0"/></a>
  +        </xsl:if>
  +      </td>
  +      <td class="logos" bgcolor="#CFDCED" colspan="5" align="right">
  +        <xsl:if test="$config/credits">
  +          <div align="right">
  +          <xsl:for-each select="$config/credits/credit">
  +            <xsl:variable name="name" select="name"/>
  +            <xsl:variable name="url" select="url"/>
  +            <xsl:variable name="image" select="image"/>
  +            <xsl:variable name="width" select="width"/>
  +            <xsl:variable name="height" select="height"/>
  +            <a href="{$url}" valign="top">
  +            <img alt="{$name} logo" border="0">
  +              <xsl:attribute name="src">
  +                <xsl:if test="not(starts-with($image, 'http://'))"><xsl:value-of select="$root"/></xsl:if>
  +                <xsl:value-of select="$image"/>
  +              </xsl:attribute>
  +              <xsl:if test="$width"><xsl:attribute name="width"><xsl:value-of select="$width"/></xsl:attribute></xsl:if>
  +              <xsl:if test="$height"><xsl:attribute name="height"><xsl:value-of select="$height"/></xsl:attribute></xsl:if>
  +            </img>
  +            <img src="{$spacer}" border="0" alt="" width="5" height="1" />
  +            </a>
  +          </xsl:for-each>
  +            </div>
  +        </xsl:if>
  +        </td>
  +      </tr>
  +    </table>
  +
   			<!-- end footer -->
   			
   </body>
  
  
  
  1.2       +7 -7      xml-forrest/src/resources/skins/forrest-site/scripts/breadcrumbs.js
  
  Index: breadcrumbs.js
  ===================================================================
  RCS file: /home/cvs/xml-forrest/src/resources/skins/forrest-site/scripts/breadcrumbs.js,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- breadcrumbs.js	30 Jul 2002 01:29:23 -0000	1.1
  +++ breadcrumbs.js	23 Sep 2002 07:47:41 -0000	1.2
  @@ -4,7 +4,7 @@
                      The Apache Software License, Version 1.1
    ============================================================================
   
  - Copyright (C) @year@ The Apache Software Foundation. All rights reserved.
  + Copyright (C) @skinconfig.year@ The Apache Software Foundation. All rights reserved.
   
    Redistribution and use in source and binary forms, with or without modifica-
    tion, are permitted provided that the following conditions are met:
  @@ -73,14 +73,14 @@
    * you use this script (you can leave it as an empty array if you wish)
    */
   var PREPREND_CRUMBS = new Array();
  -   if(!("@link1@"=="")){
  -     PREPREND_CRUMBS.push( new Array( "@link1@", "@link1.href@" ) );
  +   if(!("@skinconfig.trail.link1.name@"=="")){
  +     PREPREND_CRUMBS.push( new Array( "@skinconfig.trail.link1.name@", "@skinconfig.trail.link1.href@" ) );
      }
  -   if(!("@link2@"=="")){
  -     PREPREND_CRUMBS.push( new Array( "@link2@", "@link2.href@" ) );
  +   if(!("@skinconfig.trail.link2.name@"=="")){
  +     PREPREND_CRUMBS.push( new Array( "@skinconfig.trail.link2.name@", "@skinconfig.trail.link2.href@" ) );
      }
  -   if(!("@link3@"=="")){
  -     PREPREND_CRUMBS.push( new Array( "@link3@", "@link3.href@" ) );
  +   if(!("@skinconfig.trail.link3.name@"=="")){
  +     PREPREND_CRUMBS.push( new Array( "@skinconfig.trail.link3.name@", "@skinconfig.trail.link3.href@" ) );
      }
   
   /**
  
  
  
  1.4       +1 -1      xml-forrest/src/resources/skins/forrest-site/xslt/html/book2menu.xsl
  
  Index: book2menu.xsl
  ===================================================================
  RCS file: /home/cvs/xml-forrest/src/resources/skins/forrest-site/xslt/html/book2menu.xsl,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- book2menu.xsl	30 Jul 2002 12:31:56 -0000	1.3
  +++ book2menu.xsl	23 Sep 2002 07:47:41 -0000	1.4
  @@ -1,6 +1,6 @@
   <?xml version="1.0"?>
   <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
  -  <xsl:param name="resource"/>
  +  <xsl:param name="resource"/> <!-- filename, eg 'index.html' -->
     <xsl:template match="book">
       <div class="menu">
         <ul>
  
  
  
  1.9       +13 -2     xml-forrest/src/resources/skins/forrest-site/xslt/html/document2html.xsl
  
  Index: document2html.xsl
  ===================================================================
  RCS file: /home/cvs/xml-forrest/src/resources/skins/forrest-site/xslt/html/document2html.xsl,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- document2html.xsl	12 Aug 2002 12:21:49 -0000	1.8
  +++ document2html.xsl	23 Sep 2002 07:47:41 -0000	1.9
  @@ -4,7 +4,18 @@
     <xsl:include href = "split.xsl"/>
   
     <xsl:param name="isfaq"/>
  -  <xsl:param name="resource"/>
  +  <xsl:param name="resource"/> <!-- Filename part, eg 'index' from index.html' -->
  +  <xsl:param name="dir"/>
  +  <xsl:include href="dotdots.xsl"/>
  +
  +  <xsl:variable name="root">
  +    <xsl:call-template name="dotdots">
  +      <xsl:with-param name="path" select="$dir"/>
  +    </xsl:call-template>
  +  </xsl:variable>
  + 
  +  <xsl:variable name="skin-img-dir" select="concat(string($root), 'skin/images')"/>
  +
     <xsl:template match="document">
       <div class="content">
         <xsl:if test="normalize-space(header/title)!=''">
  @@ -18,7 +29,7 @@
               <!--td align="center" width="80" nowrap><a href="" class="dida"><img src="images/singlepage.gif"><br>
                 single page<br>
                 version</a></td-->
  -            <td align="center" width="80" nowrap="nowrap"><a href="{$resource}.pdf" class="dida"><img border="0" src="skin/images/printer.gif"/><br/>
  +            <td align="center" width="80" nowrap="nowrap"><a href="{$resource}.pdf" class="dida"><img border="0" src="{$skin-img-dir}/printer.gif"/><br/>
                 print-friendly<br/>
                 version</a></td>
             </tr>
  
  
  
  1.5       +97 -48    xml-forrest/src/resources/skins/forrest-site/xslt/html/site2xhtml.xsl
  
  Index: site2xhtml.xsl
  ===================================================================
  RCS file: /home/cvs/xml-forrest/src/resources/skins/forrest-site/xslt/html/site2xhtml.xsl,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- site2xhtml.xsl	30 Jul 2002 10:32:26 -0000	1.4
  +++ site2xhtml.xsl	23 Sep 2002 07:47:41 -0000	1.5
  @@ -1,75 +1,90 @@
   <?xml version="1.0"?>
  -<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">  <xsl:template match="site">
  +<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
  +   <!-- Default skinconf.xml in the skins/ directory -->
  +  <xsl:param name="config-file" select="'../../../../skinconf.xml'"/>
  +  <xsl:variable name="config" select="document($config-file)/skinconfig"/>
  +  <xsl:param name="dir" select="'UNDEFINED'"/>
  +  <xsl:include href="dotdots.xsl"/>
  +
  +  <xsl:variable name="root">
  +    <xsl:call-template name="dotdots">
  +      <xsl:with-param name="path" select="$dir"/>
  +    </xsl:call-template>
  +  </xsl:variable>
  + 
  +  <xsl:variable name="skin-img-dir" select="concat(string($root), 'skin/images')"/>
  +  <xsl:variable name="spacer" select="concat($root, 'skin/images/spacer.gif')"/>
  + 
  +  <xsl:template match="site">
       <html>
         <head>
           <title><xsl:value-of select="div[@class='content']/table/tr/td/h1"/></title>
  -        <link rel="stylesheet" href="skin/page.css" type="text/css"/>
  +        <link rel="stylesheet" href="{$root}skin/page.css" type="text/css"/>
         </head>
         <body bgcolor="#FFFFFF" text="#000000" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
         <!-- =========================== top line with navigation path ========================== -->
       <table cellspacing="0" cellpadding="0" border="0" width="100%" summary="navigation path">
         <tr>
           <td height="20" bgcolor="#CFDCED" valign="middle" nowrap="nowrap">
  -          <img src="skin/images/spacer.gif" border="0" alt="" width="5" height="1" />
  -          
  +          <img src="{$spacer}" border="0" alt="" width="5" height="1" />
             <!-- breadcrumb trail (javascript-generated) -->
             <font face="Arial, Helvetica, Sans-serif" size="2">
  -              <script type="text/javascript" language="JavaScript" src="skin/breadcrumbs.js"></script>
  +              <script type="text/javascript" language="JavaScript" src="{$root}skin/breadcrumbs.js"></script>
             </font>
  -          <!-- end breadcrumb trail -->
  -          <!-- old trail -->
  -          <!--<a href="@link1.href@">@link1@</a> &#62; <a href="@link2.href@">@link2@</a> &#62; <a href="@link3.href@">@link3@</a>-->
           </td>
         </tr>
         <tr>
  -        <td height="2" bgcolor="#4C6C8F"><img src="skin/images/spacer.gif" border="0" alt="" width="2" height="2" /></td>
  +        <td height="2" bgcolor="#4C6C8F"><img src="{$spacer}" border="0" alt="" width="2" height="2" /></td>
         </tr>
       </table>
       <!-- ================================= top bar with logo's and search box ===================================  -->
           <table cellspacing="0" cellpadding="0" border="0" width="100%" summary="header with logos">
         <tr>
  -        <td bgcolor="#294563"><a href="@group-logo.href@"><img src="@group-logo.src@" alt="@group-logo.alt@" width="220" height="65" border="0"/></a></td>
  -        <td bgcolor="#294563" align="center" width="100%"><a href="@project-logo.href@"><img src="@project-logo.src@" border="0" width="220" height="65" alt="@project-logo.alt@" /></a></td>
  +        <td bgcolor="#294563">
  +        <xsl:if test="$config/group-url"><a href="{$config/group-url}"><img src="{$root}{$config/group-logo}" alt="{$config/group-name} logo" border="0"/></a></xsl:if></td>
  +        <td bgcolor="#294563" align="center" width="100%"><a href="{$config/project-url}"><img src="{$root}{$config/project-logo}" border="0" alt="{$config/project-name} site" /></a></td>
           <td bgcolor="#294563" rowspan="2" valign="top">
  -          <form method="get" action="http://www.google.com/search" onsubmit="q.value = query.value + ' site:xml.apache.org'" target="_blank">
  +          <xsl:if test="not($config/disable-search) or $config/disable-search='false' and $config/project-url and $config/project-name">
  +          <form method="get" action="http://www.google.com/search" onsubmit="q.value = query.value + ' site:{$config/project-url}'" target="_blank">
               <table bgcolor="#4C6C8F" cellpadding="0" cellspacing="0" border="0" summary="search">
                 <tr>
  -                <td colspan="3"><img src="skin/images/spacer.gif" alt="" width="1" height="10" /></td>
  +                <td colspan="3"><img src="{$spacer}" alt="" width="1" height="10" /></td>
                 </tr>
                 <tr>
  -                <td><img src="skin/images/spacer.gif" alt="" width="1" height="1" /></td>
  +                <td><img src="{$spacer}" alt="" width="1" height="1" /></td>
                   <td nowrap="nowrap">
                     <input type="hidden" name="q"/>
  -                  <input type="text" id="query" size="15"/><img src="skin/images/spacer.gif" alt="" width="5" height="1" /><input type="submit" value="Search" name="Search"/>
  +                  <input type="text" id="query" size="15"/><img src="{$spacer}" alt="" width="5" height="1" /><input type="submit" value="Search" name="Search"/>
                     <br />
                     <font color="white" size="2" face="Arial, Helvetica, Sans-serif">
  -                  the xml.apache.org sites
  +                  the <xsl:value-of select="$config/project-name"/> site
   <!-- setting search options off for the moment -->
   <!--
                       <input type="radio" name="web" value="web"/>web site&#160;&#160;<input type="radio" name="mail" value="mail"/>mail lists
   -->
                     </font>
                   </td>
  -                <td><img src="skin/images/spacer.gif" alt="" width="1" height="1" /></td>
  +                <td><img src="{$spacer}" alt="" width="1" height="1" /></td>
                 </tr>
                 <tr>
  -                <td><img src="skin/images/search-left.gif" width="9" height="10" border="0" alt="" /></td>
  -                <td><img src="skin/images/spacer.gif" alt="" width="1" height="1" /></td>
  -                <td><img src="skin/images/search-right.gif" width="9" height="10" border="0" alt="" /></td>
  +                <td><img src="{$skin-img-dir}/search-left.gif" width="9" height="10" border="0" alt="" /></td>
  +                <td><img src="{$spacer}" alt="" width="1" height="1" /></td>
  +                <td><img src="{$skin-img-dir}/search-right.gif" width="9" height="10" border="0" alt="" /></td>
                 </tr>
               </table>
             </form>
  +          </xsl:if>
           </td>
  -        <td bgcolor="#294563"><img src="skin/images/spacer.gif" alt="" width="10" height="10" /></td>
  +        <td bgcolor="#294563"><img src="{$spacer}" alt="" width="10" height="10" /></td>
         </tr>
         <tr>
           <td colspan="2" bgcolor="#294563" valign="bottom">
               <xsl:apply-templates select="div[@class='tab']"/>
           </td>
  -        <td bgcolor="#294563"><img src="skin/images/spacer.gif" height="1" width="1" alt="" /></td>
  +        <td bgcolor="#294563"><img src="{$spacer}" height="1" width="1" alt="" /></td>
         </tr>
         <tr>
  -        <td colspan="4" bgcolor="#4C6C8F"><img src="skin/images/spacer.gif" alt="" height="10" width="1" /></td>
  +        <td colspan="4" bgcolor="#4C6C8F"><img src="{$spacer}" alt="" height="10" width="1" /></td>
         </tr>
       </table>
       <!-- ======================================  Menu and Content table ====================================== -->
  @@ -80,34 +95,34 @@
               <tr>
                 <td valign="top" rowspan="3">
                   <table cellspacing="0" cellpadding="0" border="0" summary="blue line">
  -                  <tr><td bgcolor="#294563"><img src="skin/images/spacer.gif" alt="" height="1" width="10" /></td></tr>
  +                  <tr><td bgcolor="#294563"><img src="{$spacer}" alt="" height="1" width="10" /></td></tr>
                     <tr><td bgcolor="#CFDCED"><font face="Arial, Helvetica, Sans-serif" size="4" color="#4C6C8F">&#160;</font></td></tr>
  -                  <tr><td bgcolor="#294563"><img src="skin/images/spacer.gif" alt="" height="1" width="10" /></td></tr>
  +                  <tr><td bgcolor="#294563"><img src="{$spacer}" alt="" height="1" width="10" /></td></tr>
                   </table>
                 </td>
  -              <td bgcolor="#294563"><img src="skin/images/spacer.gif" alt="" height="1" width="1" /></td>
  -              <td bgcolor="#4C6C8F" valign="bottom"><img src="skin/images/spacer.gif" alt="" height="10" width="10" /></td>
  +              <td bgcolor="#294563"><img src="{$spacer}" alt="" height="1" width="1" /></td>
  +              <td bgcolor="#4C6C8F" valign="bottom"><img src="{$spacer}" alt="" height="10" width="10" /></td>
                 <td bgcolor="#4C6C8F" valign="top" nowrap="nowrap">
                     <xsl:apply-templates select="div[@class='menu']"/>
                 </td>
  -              <td bgcolor="#4C6C8F" valign="bottom"><img src="skin/images/spacer.gif" alt="" height="10" width="10" /></td>
  -              <td bgcolor="#294563"><img src="skin/images/spacer.gif" alt="" height="1" width="1" /></td>
  +              <td bgcolor="#4C6C8F" valign="bottom"><img src="{$spacer}" alt="" height="10" width="10" /></td>
  +              <td bgcolor="#294563"><img src="{$spacer}" alt="" height="1" width="1" /></td>
               </tr>
               <tr>
  -              <td bgcolor="#4C6C8F" rowspan="2" colspan="2" align="left" valign="bottom"><img src="skin/images/menu-left.gif" alt="" border="0" width="10" height="10" /></td>
  -              <td bgcolor="#4C6C8F"><img src="skin/images/spacer.gif" alt="" border="0" width="10" height="10" /></td>
  -              <td bgcolor="#4C6C8F" rowspan="2" colspan="2" align="right" valign="bottom"><img src="skin/images/menu-right.gif" alt="" border="0" width="10" height="10" /></td>
  +              <td bgcolor="#4C6C8F" rowspan="2" colspan="2" align="left" valign="bottom"><img src="{$skin-img-dir}/menu-left.gif" alt="" border="0" width="10" height="10" /></td>
  +              <td bgcolor="#4C6C8F"><img src="{$spacer}" alt="" border="0" width="10" height="10" /></td>
  +              <td bgcolor="#4C6C8F" rowspan="2" colspan="2" align="right" valign="bottom"><img src="{$skin-img-dir}/menu-right.gif" alt="" border="0" width="10" height="10" /></td>
               </tr>
               <tr>
  -              <td bgcolor="#294563" height="1"><img src="skin/images/spacer.gif" alt="" height="1" width="1" /></td>
  +              <td bgcolor="#294563" height="1"><img src="{$spacer}" alt="" height="1" width="1" /></td>
               </tr>
             </table>
           </td>
           <td width="100%" valign="top">
             <table cellspacing="0" cellpadding="0" border="0" width="100%" summary="content">
  -            <tr><td bgcolor="#294563" colspan="4"><img src="skin/images/spacer.gif" alt="" height="1" width="10" /></td></tr>
  +            <tr><td bgcolor="#294563" colspan="4"><img src="{$spacer}" alt="" height="1" width="10" /></td></tr>
               <tr>
  -              <td bgcolor="#CFDCED" width="10" align="left"><img src="skin/images/spacer.gif" alt="" height="1" width="10" /></td>
  +              <td bgcolor="#CFDCED" width="10" align="left"><img src="{$spacer}" alt="" height="1" width="10" /></td>
                 <td bgcolor="#CFDCED" width="50%" align="left">
   <!-- ========================================= Page number ===================================== -->
                   <font face="Arial, Helvetica, Sans-serif" size="3" color="#4C6C8F">
  @@ -116,7 +131,7 @@
                     <b>Page 1 of 5</b>
   -->
                   </font>
  -                  <img src="skin/images/spacer.gif" alt="" height="8" width="10" />
  +                  <img src="{$spacer}" alt="" height="8" width="10" />
                 </td>
                 <td bgcolor="#CFDCED" width="50%" align="right">
   <!--  ====================================== page navigation ===================================== -->
  @@ -126,17 +141,17 @@
                     <b>&#171; prev&#160;&#160;<font size="4">[3]</font>&#160;&#160;next &#187;</b>
   -->
                   </font>
  -                  <img src="skin/images/spacer.gif" alt="" height="8" width="10" />
  +                  <img src="{$spacer}" alt="" height="8" width="10" />
                 </td>
  -              <td bgcolor="#CFDCED" width="10"><img src="skin/images/spacer.gif" alt="" height="1" width="10" /></td>
  +              <td bgcolor="#CFDCED" width="10"><img src="{$spacer}" alt="" height="1" width="10" /></td>
               </tr>
  -            <tr><td bgcolor="#294563" colspan="4"><img src="skin/images/spacer.gif" alt="" height="1" width="10" /></td></tr>
  +            <tr><td bgcolor="#294563" colspan="4"><img src="{$spacer}" alt="" height="1" width="10" /></td></tr>
               <tr>
  -              <td width="10" align="left"><img src="skin/images/spacer.gif" alt="" height="1" width="10" /></td>
  +              <td width="10" align="left"><img src="{$spacer}" alt="" height="1" width="10" /></td>
                 <td width="100%" align="left">
                   <xsl:apply-templates select="div[@class='content']"/>
                 </td>
  -              <td width="10"><img src="skin/images/spacer.gif" alt="" height="1" width="10" /></td>
  +              <td width="10"><img src="{$spacer}" alt="" height="1" width="10" /></td>
               </tr>
             </table>
           </td>
  @@ -145,23 +160,57 @@
   <!-- footer -->
       <table border="0" height="20" width="100%" cellpadding="0" cellspacing="0" summary="footer">
         <tr>
  -        <td width="10"><img src="skin/images/spacer.gif" alt="" height="1" width="10" /></td>
  +        <td width="10"><img src="{$spacer}" alt="" height="1" width="10" /></td>
         </tr>
  -      <tr><td bgcolor="#4C6C8F" height="1" colspan="2"><img src="skin/images/spacer.gif" alt="" width="1" height="1" /><a href="skin/images/label.gif"></a><a href="skin/images/page.gif"></a><a href="skin/images/chapter.gif"></a><a href="skin/images/chapter_open.gif"></a><a href="skin/images/current.gif"></a><a href="/favicon.ico"></a></td></tr>
  +      <tr><td bgcolor="#4C6C8F" height="1" colspan="2"><img src="{$spacer}" alt="" width="1" height="1" /><a href="{$skin-img-dir}/label.gif"></a><a href="{$skin-img-dir}/page.gif"></a><a href="{$skin-img-dir}/chapter.gif"></a><a href="{$skin-img-dir}/chapter_open.gif"></a><a href="{$skin-img-dir}/current.gif"></a><a href="/favicon.ico"></a></td></tr>
         <tr>
  -        <td align="center" class="copyright" bgcolor="#CFDCED" colspan="2">
  -          <font face="Arial, Helvetica, Sans-Serif" size="2">Copyright &#169; @year@ @vendor@. All Rights Reserved<script language="JavaScript" type="text/javascript"><![CDATA[<!--
  +        <td align="center" class="copyright" bgcolor="#CFDCED" colspan="6">
  +          <font face="Arial, Helvetica, Sans-Serif" size="2">Copyright &#169;
  +          <xsl:value-of select="$config/year"/>&#160;<xsl:value-of
  +          select="$config/vendor"/> All rights reserved.<script language="JavaScript" type="text/javascript"><![CDATA[<!--
                 document.write(". - "+"Last Published: " + document.lastModified);
               //  -->]]></script></font>
           </td>
         </tr>
  +      <tr>
  +      <td class="logos" bgcolor="#CFDCED" colspan="1" align="left">
  +        <xsl:if test="$config/host-logo and not($config/host-logo = '')">
  +            <a href="{$config/host-url}"><img src="{$config/host-logo}" alt="{$config/host-name} logo" border="0"/></a>
  +        </xsl:if>
  +      </td>
  +      <td class="logos" bgcolor="#CFDCED" colspan="5" align="right">
  +        <xsl:if test="$config/credits">
  +          <div align="right">
  +          <xsl:for-each select="$config/credits/credit">
  +            <xsl:variable name="name" select="name"/>
  +            <xsl:variable name="url" select="url"/>
  +            <xsl:variable name="image" select="image"/>
  +            <xsl:variable name="width" select="width"/>
  +            <xsl:variable name="height" select="height"/>
  +            <a href="{$url}" valign="top">
  +            <img alt="{$name} logo" border="0">
  +              <xsl:attribute name="src">
  +                <xsl:if test="not(starts-with($image, 'http://'))"><xsl:value-of select="$root"/></xsl:if>
  +                <xsl:value-of select="$image"/>
  +              </xsl:attribute>
  +              <xsl:if test="$width"><xsl:attribute name="width"><xsl:value-of select="$width"/></xsl:attribute></xsl:if>
  +              <xsl:if test="$height"><xsl:attribute name="height"><xsl:value-of select="$height"/></xsl:attribute></xsl:if>
  +            </img>
  +            <img src="{$spacer}" border="0" alt="" width="5" height="1" />
  +            </a>
  +          </xsl:for-each>
  +            </div>
  +        </xsl:if>
  +        </td>
  +      </tr>
       </table>
         </body>
  -    </html></xsl:template>
  +    </html>
  +    </xsl:template>
       <xsl:template match="node()|@*" priority="-1">
         <xsl:copy>
           <xsl:apply-templates select="@*"/>
           <xsl:apply-templates/>
         </xsl:copy>
  -    </xsl:template>
  -  </xsl:stylesheet>
  +  </xsl:template>
  +</xsl:stylesheet>
  
  
  
  1.4       +17 -10    xml-forrest/src/resources/skins/forrest-site/xslt/html/tab2menu.xsl
  
  Index: tab2menu.xsl
  ===================================================================
  RCS file: /home/cvs/xml-forrest/src/resources/skins/forrest-site/xslt/html/tab2menu.xsl,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- tab2menu.xsl	10 Sep 2002 08:04:50 -0000	1.3
  +++ tab2menu.xsl	23 Sep 2002 07:47:41 -0000	1.4
  @@ -1,11 +1,20 @@
   <?xml version="1.0"?>
   <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
  -  <xsl:param name="resource"/>
  +  <xsl:param name="resource" select="'UNDEFINED'"/>
  +  <xsl:param name="dir" select="'UNDEFINED'"/>
     <xsl:include href="dotdots.xsl"/>
  -  
  +
  +  <xsl:variable name="root">
  +    <xsl:call-template name="dotdots">
  +      <xsl:with-param name="path" select="$dir"/>
  +    </xsl:call-template>
  +  </xsl:variable>
  +
  +  <xsl:variable name="skin-img-dir" select="concat(string($root), 'skin/images')"/>
  +
     <xsl:template name="spacer">
       <td width="8">
  -      <img src="skin/images/spacer.gif" width="8" height="8" alt=""/>
  +      <img src="{$root}skin/images/spacer.gif" width="8" height="8" alt=""/>
       </td>
     </xsl:template>
     
  @@ -13,13 +22,11 @@
         <td valign="bottom">
           <table cellspacing="0" cellpadding="0" border="0" height="25" summary="non selected tab">
             <tr>
  -            <td bgcolor="#B2C4E0" width="5" valign="top"><img src="skin/images/tab-left.gif" alt="" width="5" height="5" /></td>
  +            <td bgcolor="#B2C4E0" width="5" valign="top"><img src="{$skin-img-dir}/tab-left.gif" alt="" width="5" height="5" /></td>
               <td bgcolor="#B2C4E0" valign="middle">
                 <a>
                   <xsl:attribute name="href">
  -                  <xsl:call-template name="dotdots">
  -                    <xsl:with-param name="path" select="$resource"/>
  -                  </xsl:call-template>
  +                  <xsl:value-of select="$root"/>
                     <xsl:if test="@dir != ''">
                       <xsl:value-of select="concat(translate(normalize-space(translate(@dir, ' /', '/ ')), ' /', '/ '), '/')"/>
                       <!-- The above expression strips duplicate and trailing /'s. Cunning :) :) -->
  @@ -27,7 +34,7 @@
                   </xsl:attribute>
                   <font face="Arial, Helvetica, Sans-serif" size="2"><xsl:value-of select="@label"/></font></a>
               </td>
  -            <td bgcolor="#B2C4E0" width="5" valign="top"><img src="skin/images/tab-right.gif" alt="" width="5" height="5" />
  +            <td bgcolor="#B2C4E0" width="5" valign="top"><img src="{$skin-img-dir}/tab-right.gif" alt="" width="5" height="5" />
               </td>
             </tr>
           </table>
  @@ -38,11 +45,11 @@
         <td valign="bottom">
           <table cellspacing="0" cellpadding="0" border="0" height="30" summary="selected tab">
             <tr>
  -            <td bgcolor="#4C6C8F" width="5" valign="top"><img src="skin/images/tabSel-left.gif" alt="" width="5" height="5" /></td>
  +            <td bgcolor="#4C6C8F" width="5" valign="top"><img src="{$skin-img-dir}/tabSel-left.gif" alt="" width="5" height="5" /></td>
               <td bgcolor="#4C6C8F" valign="middle">
                 <font face="Arial, Helvetica, Sans-serif" size="2" color="#ffffff"><b><xsl:value-of select="@label"/></b></font>
               </td>
  -            <td bgcolor="#4C6C8F" width="5" valign="top"><img src="skin/images/tabSel-right.gif" alt="" width="5" height="5" /></td>
  +            <td bgcolor="#4C6C8F" width="5" valign="top"><img src="{$skin-img-dir}/tabSel-right.gif" alt="" width="5" height="5" /></td>
             </tr>
           </table>
         </td>
  
  
  

Mime
View raw message