rubys       01/03/06 10:12:03

  Modified:    proposal/gump/stylesheet bash.xsl build.xsl jakarta.xsl
                        merge.xsl publish.xsl update.xsl win2k.xsl xref.xsl
  Log:
  Factor out logic of determining the log directory
  Add support for specifying the banner image and link
  Continue work of factoring out common translations
  
  Revision  Changes    Path
  1.10      +9 -7      jakarta-alexandria/proposal/gump/stylesheet/bash.xsl
  
  Index: bash.xsl
  ===================================================================
  RCS file: /home/cvs/jakarta-alexandria/proposal/gump/stylesheet/bash.xsl,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- bash.xsl  2001/03/04 03:39:24     1.9
  +++ bash.xsl  2001/03/06 18:11:49     1.10
  @@ -160,25 +160,27 @@
     <!-- =================================================================== -->
   
     <xsl:template match="workspace">
  -    <xsl:variable name="basedir" select="@basedir"/>
  +    <xsl:variable name="basedir" select="translate(@basedir, '\', '/')"/>
  +    <xsl:variable name="cvsdir"  select="translate(@cvsdir,  '\', '/')"/>
  +
       <xsl:text>#/bin/sh&#10;</xsl:text>
   
       <xsl:text>test -e </xsl:text>
  -    <xsl:value-of select="translate($basedir,'\','/')"/>
  +    <xsl:value-of select="$basedir"/>
       <xsl:text> || mkdir </xsl:text>
  -    <xsl:value-of select="translate($basedir,'\','/')"/>
  +    <xsl:value-of select="$basedir"/>
       <xsl:text>&#10;</xsl:text>
   
       <xsl:text>test -e </xsl:text>
  -    <xsl:value-of select="translate($basedir,'\','/')"/>
  +    <xsl:value-of select="$basedir"/>
       <xsl:text>/log || mkdir </xsl:text>
  -    <xsl:value-of select="translate($basedir,'\','/')"/>
  +    <xsl:value-of select="$basedir"/>
       <xsl:text>/log &#10;</xsl:text>
   
       <xsl:text>test -e </xsl:text>
  -    <xsl:value-of select="translate(@cvsdir,'\','/')"/>
  +    <xsl:value-of select="$cvsdir"/>
       <xsl:text> || mkdir </xsl:text>
  -    <xsl:value-of select="translate(@cvsdir,'\','/')"/>
  +    <xsl:value-of select="$cvsdir"/>
       <xsl:text>&#10;</xsl:text>
   
       <xsl:text>sh publish.sh $1 </xsl:text>
  
  
  
  1.3       +11 -16    jakarta-alexandria/proposal/gump/stylesheet/build.xsl
  
  Index: build.xsl
  ===================================================================
  RCS file: /home/cvs/jakarta-alexandria/proposal/gump/stylesheet/build.xsl,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- build.xsl 2001/03/06 15:34:20     1.2
  +++ build.xsl 2001/03/06 18:11:51     1.3
  @@ -8,22 +8,13 @@
       </xsl:copy>
     </xsl:template>
   
  -  <xsl:variable name="basedir"
  -    select="translate(/workspace/@basedir, '\', '/')"/>
  +  <xsl:variable name="basedir" select="/workspace/@basedir"/>
  +  <xsl:variable name="cvsdir"  select="/workspace/@cvsdir"/>
  +  <xsl:variable name="logdir"  select="/workspace/@logdir"/>
   
  -  <xsl:variable name="cvsdir"
  -             select="translate(/workspace/@cvsdir, '\', '/')"/>
  +  <xsl:variable name="banner-link"  select="/workspace/@banner-link"/>
  +  <xsl:variable name="banner-image" select="/workspace/@banner-image"/>
   
  -     <xsl:variable name="logdir">
  -             <xsl:choose>
  -                     <xsl:when test="/workspace/@logdir"><xsl:value-of
  -                             select="translate(/workspace/@logdir, '\', 
'/')"/></xsl:when>
  -                     <xsl:otherwise><xsl:value-of select="$basedir"/>
  -                             <xsl:text>/log</xsl:text>
  -                     </xsl:otherwise>
  -             </xsl:choose>
  -     </xsl:variable>
  -
     <!-- =================================================================== -->
     <!-- provide support for specifying desired projects on the command line -->
     <!-- =================================================================== -->
  @@ -42,8 +33,10 @@
           <copy fromdir="{$cvsdir}/{@name}"
                 todir="{$basedir}/{@name}"/>
         </xsl:for-each>
  +
  +      <html log="{$logdir}/index.html" 
  +        banner-image="{$banner-image}" banner-link="{$banner-link}">
   
  -      <html log="{$logdir}/index.html">
           <title>
             <xsl:text>Build status - </xsl:text>
             <date/>
  @@ -89,8 +82,10 @@
       <xsl:copy>
         <xsl:copy-of select="@*"/>
         <xsl:variable name="srcdir" select="@srcdir"/>
  +
  +      <html log="{$logdir}/{@name}.html" 
  +        banner-image="{$banner-image}" banner-link="{$banner-link}">
   
  -      <html log="{$logdir}/{@name}.html">
           <title>
             <xsl:text>Build </xsl:text>
             <xsl:value-of select="@name"/>
  
  
  
  1.3       +2 -4      jakarta-alexandria/proposal/gump/stylesheet/jakarta.xsl
  
  Index: jakarta.xsl
  ===================================================================
  RCS file: /home/cvs/jakarta-alexandria/proposal/gump/stylesheet/jakarta.xsl,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- jakarta.xsl       2001/03/06 15:34:21     1.2
  +++ jakarta.xsl       2001/03/06 18:11:51     1.3
  @@ -1,8 +1,6 @@
   <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
     <xsl:output indent="yes"/>
   
  -     <xsl:variable name="image">images/jakarta-logo.gif</xsl:variable>
  -
     <xsl:template match="*|@*|text()">
       <xsl:copy>
         <xsl:apply-templates select="*|@*|text()"/>
  @@ -24,8 +22,8 @@
           <table border="0" width="100%" cellspacing="0">
             <tr>
               <td colspan="2">
  -              <a href="http://jakarta.apache.org">
  -                <img src="$image" align="left" border="0"/>
  +              <a href="{@banner-link}">
  +                <img src="{@banner-image}" align="left" border="0"/>
                 </a>
               </td>
             </tr>
  
  
  
  1.2       +22 -0     jakarta-alexandria/proposal/gump/stylesheet/merge.xsl
  
  Index: merge.xsl
  ===================================================================
  RCS file: /home/cvs/jakarta-alexandria/proposal/gump/stylesheet/merge.xsl,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- merge.xsl 2001/02/04 18:03:54     1.1
  +++ merge.xsl 2001/03/06 18:11:52     1.2
  @@ -12,6 +12,28 @@
       <xsl:variable name="basedir" select="@basedir"/>
       <xsl:copy>
   
  +      <!-- default banner-image, if not present -->
  +      <xsl:if test="not(@banner-image)">
  +        <xsl:attribute name="banner-image">
  +          <xsl:text>http://jakarta.apache.org/images/jakarta-logo.gif</xsl:text>
  +        </xsl:attribute>
  +      </xsl:if>
  +
  +      <!-- default banner-link, if not present -->
  +      <xsl:if test="not(@banner-link)">
  +        <xsl:attribute name="banner-link">
  +          <xsl:text>http://jakarta.apache.org</xsl:text>
  +        </xsl:attribute>
  +      </xsl:if>
  +
  +      <!-- default log directory, if not present -->
  +      <xsl:if test="not(@logdir)">
  +        <xsl:attribute name="logdir">
  +          <xsl:value-of select="$basedir"/>
  +          <xsl:text>/log</xsl:text>
  +        </xsl:attribute>
  +      </xsl:if>
  +
         <xsl:copy-of select="@*"/>
         <xsl:copy-of select="*[not(self::project)]"/>
   
  
  
  
  1.2       +1 -1      jakarta-alexandria/proposal/gump/stylesheet/publish.xsl
  
  Index: publish.xsl
  ===================================================================
  RCS file: /home/cvs/jakarta-alexandria/proposal/gump/stylesheet/publish.xsl,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- publish.xsl       2001/02/04 18:03:54     1.1
  +++ publish.xsl       2001/03/06 18:11:52     1.2
  @@ -10,7 +10,7 @@
   
       <publish>
   
  -      <html>
  +      <html banner-image="{@banner-image}" banner-link="{@banner-link}">
           <title>
             <xsl:text>Source: </xsl:text>
             <code><arg/></code>
  
  
  
  1.4       +11 -19    jakarta-alexandria/proposal/gump/stylesheet/update.xsl
  
  Index: update.xsl
  ===================================================================
  RCS file: /home/cvs/jakarta-alexandria/proposal/gump/stylesheet/update.xsl,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- update.xsl        2001/03/06 15:34:21     1.3
  +++ update.xsl        2001/03/06 18:11:53     1.4
  @@ -1,23 +1,11 @@
   <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
   
  -  <xsl:output indent="yes"/>
  +  <xsl:variable name="basedir" select="/workspace/@basedir"/>
  +  <xsl:variable name="logdir"  select="/workspace/@logdir"/>
   
  -  <xsl:variable name="basedir"
  -    select="translate(/workspace/@basedir, '\', '/')"/>
  +  <xsl:variable name="banner-link"  select="/workspace/@banner-link"/>
  +  <xsl:variable name="banner-image" select="/workspace/@banner-image"/>
   
  -  <xsl:variable name="cvsdir"
  -             select="translate(/workspace/@cvsdir, '\', '/')"/>
  -
  -     <xsl:variable name="logdir">
  -             <xsl:choose>
  -                     <xsl:when test="/workspace/@logdir"><xsl:value-of
  -                             select="translate(/workspace/@logdir, '\', 
'/')"/></xsl:when>
  -                     <xsl:otherwise><xsl:value-of select="$basedir"/>
  -                             <xsl:text>/log</xsl:text>
  -                     </xsl:otherwise>
  -             </xsl:choose>
  -     </xsl:variable>
  -
     <xsl:template match="*|@*">
       <xsl:copy>
         <xsl:apply-templates select="*|@*"/>
  @@ -35,9 +23,11 @@
   
         <mkdir dir="{$basedir}"/>
         <mkdir dir="{$logdir}"/>
  -      <mkdir dir="{$cvsdir}"/>
  +      <mkdir dir="{@cvsdir}"/>
   
  -      <html log="{$logdir}/cvs_index.html">
  +      <html log="{$logdir}/cvs_index.html" 
  +        banner-image="{$banner-image}" banner-link="{$banner-link}">
  +
           <title>
             <xsl:text>CVS update - </xsl:text>
             <date/>
  @@ -82,8 +72,10 @@
   
       <xsl:copy>
         <xsl:copy-of select="@*"/>
  +
  +      <html log="{$logdir}/cvs_{@name}.html" 
  +        banner-image="{$banner-image}" banner-link="{$banner-link}">
   
  -      <html log="{$logdir}/cvs_{@name}.html">
           <title>
             <xsl:text>cvs update </xsl:text>
             <xsl:value-of select="@name"/>
  
  
  
  1.4       +11 -24    jakarta-alexandria/proposal/gump/stylesheet/win2k.xsl
  
  Index: win2k.xsl
  ===================================================================
  RCS file: /home/cvs/jakarta-alexandria/proposal/gump/stylesheet/win2k.xsl,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- win2k.xsl 2001/03/06 15:34:21     1.3
  +++ win2k.xsl 2001/03/06 18:11:54     1.4
  @@ -1,22 +1,6 @@
   <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
     <xsl:strip-space elements="*"/>
   
  -  <xsl:variable name="basedir"
  -    select="translate(/workspace/@basedir, '/', '\')"/>
  -
  -  <xsl:variable name="cvsdir"
  -             select="translate(/workspace/@cvsdir, '/', '\')"/>
  -
  -     <xsl:variable name="logdir">
  -             <xsl:choose>
  -                     <xsl:when test="/workspace/@logdir"><xsl:value-of
  -                             select="translate(/workspace/@logdir, '/', 
'\')"/></xsl:when>
  -                     <xsl:otherwise><xsl:value-of select="$basedir"/>
  -                             <xsl:text>\log</xsl:text>
  -                     </xsl:otherwise>
  -             </xsl:choose>
  -     </xsl:variable>
  -
     <!-- =================================================================== -->
     <!--                               build                                 -->
     <!-- =================================================================== -->
  @@ -96,7 +80,7 @@
       <xsl:text>if not "%1"=="" goto top&#10;</xsl:text>
   
       <xsl:text>chdir /d </xsl:text>
  -    <xsl:value-of select="$basedir"/>
  +    <xsl:value-of select="@basedir"/>
       <xsl:text>&#10;</xsl:text>
   
       <xsl:text>ENDLOCAL&#10;</xsl:text>
  @@ -145,6 +129,9 @@
     <!-- =================================================================== -->
   
     <xsl:template match="workspace">
  +    <xsl:variable name="basedir" select="translate(@basedir, '/', '\')"/>
  +    <xsl:variable name="cvsdir"  select="translate(@cvsdir,  '/', '\')"/>
  +
       <xsl:text>@echo off&#10;</xsl:text>
   
       <xsl:text>if not exist </xsl:text>
  @@ -160,13 +147,13 @@
       <xsl:text>\log &#10;</xsl:text>
   
       <xsl:text>if not exist </xsl:text>
  -    <xsl:value-of select="translate(@cvsdir,'/','\')"/>
  +    <xsl:value-of select="$cvsdir"/>
       <xsl:text>  mkdir </xsl:text>
  -    <xsl:value-of select="translate(@cvsdir,'/','\')"/>
  +    <xsl:value-of select="$cvsdir"/>
       <xsl:text>&#10;</xsl:text>
   
       <xsl:text>call publish.bat %1 </xsl:text>
  -    <xsl:value-of select="@basedir"/>
  +    <xsl:value-of select="$basedir"/>
       <xsl:text>\log\source_index.html&#10;</xsl:text>
   
       <xsl:for-each select="project">
  @@ -175,7 +162,7 @@
         <xsl:text>call publish </xsl:text>
         <xsl:value-of select="translate(@href,'/','\\')"/>
         <xsl:text> </xsl:text>
  -      <xsl:value-of select="../@basedir"/>
  +      <xsl:value-of select="$basedir"/>
         <xsl:text>\log\source_</xsl:text>
         <xsl:value-of select="substring-before(substring-after(@href,'/'),'.')"/>
         <xsl:text>.html&#10;</xsl:text>
  @@ -183,17 +170,17 @@
   
       <xsl:text>for %%i in (..\stylesheet\*.xsl) do </xsl:text>
       <xsl:text>call publish stylesheet\%%~nxi </xsl:text>
  -    <xsl:value-of select="@basedir"/>
  +    <xsl:value-of select="$basedir"/>
       <xsl:text>\log\code_%%~ni.html&#10;</xsl:text>
   
       <xsl:text>call xref.bat&#10;</xsl:text>
   
       <xsl:text>copy update.bat </xsl:text>
  -    <xsl:value-of select="@basedir"/>
  +    <xsl:value-of select="$basedir"/>
       <xsl:text>&#10;</xsl:text>
   
       <xsl:text>copy build.bat </xsl:text>
  -    <xsl:value-of select="@basedir"/>
  +    <xsl:value-of select="$basedir"/>
       <xsl:text>&#10;</xsl:text>
   
       <xsl:text>echo.&#10;</xsl:text>
  
  
  
  1.3       +3 -14     jakarta-alexandria/proposal/gump/stylesheet/xref.xsl
  
  Index: xref.xsl
  ===================================================================
  RCS file: /home/cvs/jakarta-alexandria/proposal/gump/stylesheet/xref.xsl,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- xref.xsl  2001/03/06 15:34:21     1.2
  +++ xref.xsl  2001/03/06 18:11:56     1.3
  @@ -1,18 +1,5 @@
   <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
   
  -  <xsl:variable name="basedir"
  -    select="translate(/workspace/@basedir, '\', '/')"/>
  -
  -     <xsl:variable name="logdir">
  -             <xsl:choose>
  -                     <xsl:when test="/workspace/@logdir"><xsl:value-of
  -                             select="translate(/workspace/@logdir, '\', 
'/')"/></xsl:when>
  -                     <xsl:otherwise><xsl:value-of select="$basedir"/>
  -                             <xsl:text>/log</xsl:text>
  -                     </xsl:otherwise>
  -             </xsl:choose>
  -     </xsl:variable>
  -
     <!-- =================================================================== -->
     <!--         Produce a cross reference of project dependencies           -->
     <!-- =================================================================== -->
  @@ -20,8 +7,10 @@
     <xsl:template match="workspace">
   
       <xref>
  +
  +      <html log="{@logdir}/index.html" 
  +        banner-image="{@banner-image}" banner-link="{@banner-link}">
   
  -      <html log="{$logdir}/xref.html">
           <title>Cross Reference</title>
   
           <sidebar>
  
  
  

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

Reply via email to