rubys       01/10/23 12:35:52

  Modified:    proposal/gump/stylesheet bash.xsl build.xsl update.xsl
                        win2k.xsl
  Log:
  Cleanup and performance changes
  
  Revision  Changes    Path
  1.64      +35 -13    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.63
  retrieving revision 1.64
  diff -u -r1.63 -r1.64
  --- bash.xsl  2001/10/22 06:43:34     1.63
  +++ bash.xsl  2001/10/23 19:35:52     1.64
  @@ -51,7 +51,7 @@
     <!-- =================================================================== -->
   
     <xsl:template match="build">
  -    <xsl:text>#/bin/bash&#10;</xsl:text>
  +    <xsl:text>#!/bin/bash&#10;</xsl:text>
   
       <xsl:if test="$cygwin=1">
         <xsl:text>export CP=`cygpath --path --unix "$CLASSPATH"`&#10;</xsl:text>
  @@ -103,7 +103,7 @@
     <!-- =================================================================== -->
   
     <xsl:template match="update">
  -    <xsl:text>#/bin/bash&#10;</xsl:text>
  +    <xsl:text>#!/bin/bash&#10;</xsl:text>
   
       <xsl:text>cd </xsl:text>
       <xsl:value-of select="translate(@cvsdir,'\','/')"/>
  @@ -138,7 +138,7 @@
     <!-- =================================================================== -->
   
     <xsl:template match="xref">
  -    <xsl:text>#/bin/bash&#10;</xsl:text>
  +    <xsl:text>#!/bin/bash&#10;</xsl:text>
       <xsl:apply-templates/>
     </xsl:template>
   
  @@ -147,7 +147,7 @@
     <!-- =================================================================== -->
   
     <xsl:template match="publish">
  -    <xsl:text>#/bin/bash&#10;</xsl:text>
  +    <xsl:text>#!/bin/bash&#10;</xsl:text>
       <xsl:text>echo - $1&#10;</xsl:text>
       <xsl:text>export OUT=\&gt;\&gt;$2&#10;</xsl:text>
       <xsl:apply-templates/>
  @@ -172,7 +172,7 @@
       <xsl:variable name="cvsdir"  select="translate(@cvsdir,  '\', '/')"/>
       <xsl:variable name="logdir"  select="translate(@logdir,  '\', '/')"/>
   
  -    <xsl:text>#/bin/bash&#10;</xsl:text>
  +    <xsl:text>#!/bin/bash&#10;</xsl:text>
   
       <xsl:text>test -d </xsl:text>
       <xsl:value-of select="$basedir"/>
  @@ -262,7 +262,7 @@
     <!-- =================================================================== -->
   
     <xsl:template match="logic">
  -    <xsl:text>eval "echo \&lt;XMP\> $OUT"&#10;</xsl:text>
  +    <xsl:text>eval "echo \&lt;XMP\&gt; $OUT"&#10;</xsl:text>
   
       <xsl:text>fi&#10;</xsl:text>
       <xsl:text>&#10;if test $</xsl:text>
  @@ -273,7 +273,7 @@
   
       <xsl:text>fi&#10;</xsl:text>
       <xsl:text>&#10;if test $all; then&#10;</xsl:text>
  -    <xsl:text>eval "echo \&lt;/XMP\> $OUT"&#10;</xsl:text>
  +    <xsl:text>eval "echo \&lt;/XMP\&gt; $OUT"&#10;</xsl:text>
   
     </xsl:template>
   
  @@ -301,13 +301,13 @@
   
     <xsl:template match="td[@class='status']">
       <xsl:text>case $STATUS in &#10;</xsl:text>
  -    <xsl:text> SUCCESS) eval "echo \&lt;td\> $OUT" ;;&#10;</xsl:text>
  +    <xsl:text> SUCCESS) eval "echo \&lt;td\&gt; $OUT" ;;&#10;</xsl:text>
       <xsl:text> FAILED) eval</xsl:text>
  -    <xsl:text> "echo \&lt;td class="fail"\> $OUT" ;;&#10;</xsl:text>
  -    <xsl:text> *) eval "echo \&lt;td class="warn"\>$OUT" ;;&#10;</xsl:text>
  +    <xsl:text> "echo \&lt;td class="fail"\&gt; $OUT" ;;&#10;</xsl:text>
  +    <xsl:text> *) eval "echo \&lt;td class="warn"\&gt;$OUT" ;;&#10;</xsl:text>
       <xsl:text>esac&#10;</xsl:text>
       <xsl:apply-templates/>
  -    <xsl:text>eval "echo \&lt;/td\> $OUT"&#10;</xsl:text>
  +    <xsl:text>eval "echo \&lt;/td\&gt; $OUT"&#10;</xsl:text>
     </xsl:template>
   
     <!-- =================================================================== -->
  @@ -401,7 +401,9 @@
         <xsl:text>=</xsl:text>
         <xsl:choose>
           <xsl:when test="@type = 'path' and $cygwin = 1">
  -          <xsl:text>'`cygpath --path --windows "</xsl:text><xsl:value-of 
select="@value"/><xsl:text>"`'</xsl:text>
  +          <xsl:text>'`cygpath --path --windows "</xsl:text>
  +          <xsl:value-of select="@value"/>
  +          <xsl:text>"`'</xsl:text>
           </xsl:when>
           <xsl:otherwise><xsl:value-of select="@value"/></xsl:otherwise>
         </xsl:choose>
  @@ -636,6 +638,26 @@
     </xsl:template>
   
     <!-- =================================================================== -->
  +  <!--          support for capturing and including static text            --> 
  +  <!-- =================================================================== -->
  +
  +  <xsl:template match="output">
  +    <xsl:text>export OUT=\&gt;\&gt;</xsl:text>
  +    <xsl:value-of select="translate(@file,'\','/')"/>
  +    <xsl:text>&#10;</xsl:text>
  +
  +    <xsl:apply-templates/>
  +  </xsl:template>
  +
  +  <xsl:template match="include">
  +    <xsl:text>eval "cat </xsl:text>
  +    <xsl:value-of select="translate(@file,'\','/')"/>
  +    <xsl:text> $OUT"&#10;</xsl:text>
  +
  +    <xsl:apply-templates/>
  +  </xsl:template>
  +
  +  <!-- =================================================================== -->
     <!--                 default catchers for html and text                  -->
     <!-- =================================================================== -->
   
  @@ -648,7 +670,7 @@
   
       <xsl:text>eval "echo \&lt;html\\$OUT"&#10;</xsl:text>
       <xsl:apply-templates/>
  -    <xsl:text>eval "echo \&lt;/html\> $OUT"&#10;</xsl:text>
  +    <xsl:text>eval "echo \&lt;/html\&gt; $OUT"&#10;</xsl:text>
   
       <xsl:if test="ancestor::html/@log">
         <xsl:text>export OUT=\&gt;\&gt;</xsl:text>
  
  
  
  1.47      +14 -18    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.46
  retrieving revision 1.47
  diff -u -r1.46 -r1.47
  --- build.xsl 2001/10/23 17:16:36     1.46
  +++ build.xsl 2001/10/23 19:35:52     1.47
  @@ -52,6 +52,18 @@
           </html>
         </project>
   
  +      <output file="{$logdir}/buildlog.list">
  +        <strong><a href="index.html">Build logs</a></strong>
  +        <ul>
  +          <xsl:for-each select="project[ant|script]">
  +            <xsl:sort select="@name"/>
  +            <li>
  +              <a href="{@name}.html"><xsl:value-of select="@name"/></a>
  +            </li>
  +          </xsl:for-each>
  +        </ul>
  +      </output>
  +
         <html log="{$logdir}/index.html"
           banner-image="{$banner-image}" banner-link="{$banner-link}">
   
  @@ -61,15 +73,7 @@
           </title>
   
           <sidebar>
  -          <strong><a href="index.html">Build logs</a></strong>
  -          <ul>
  -            <xsl:for-each select="project[ant|script]">
  -              <xsl:sort select="@name"/>
  -              <li>
  -                <a href="{@name}.html"><xsl:value-of select="@name"/></a>
  -              </li>
  -            </xsl:for-each>
  -          </ul>
  +          <include file="{$logdir}/buildlog.list"/>
           </sidebar>
   
           <menu>
  @@ -116,15 +120,7 @@
           <xsl:copy-of select="note"/>
   
           <sidebar>
  -          <strong><a href="index.html">Build logs</a></strong>
  -          <ul>
  -            <xsl:for-each select="../project[ant|script]">
  -              <xsl:sort select="@name"/>
  -              <li>
  -                <a href="{@name}.html"><xsl:value-of select="@name"/></a>
  -              </li>
  -            </xsl:for-each>
  -          </ul>
  +          <include file="{$logdir}/buildlog.list"/>
           </sidebar>
   
           <menu>
  
  
  
  1.17      +13 -9     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.16
  retrieving revision 1.17
  diff -u -r1.16 -r1.17
  --- update.xsl        2001/10/20 20:50:33     1.16
  +++ update.xsl        2001/10/23 19:35:52     1.17
  @@ -25,6 +25,18 @@
         <mkdir dir="{$logdir}"/>
         <mkdir dir="{@cvsdir}"/>
   
  +      <output file="{$logdir}/cvslog.list">
  +        <strong><a href="index.html">Cvs logs</a></strong>
  +        <ul>
  +          <xsl:for-each select="module">
  +            <xsl:sort select="@name"/>
  +            <li>
  +              <a href="cvs_{@name}.html"><xsl:value-of select="@name"/></a>
  +            </li>
  +          </xsl:for-each>
  +        </ul>
  +      </output>
  +
         <html log="{$logdir}/cvs_index.html"
           banner-image="{$banner-image}" banner-link="{$banner-link}">
   
  @@ -87,15 +99,7 @@
           </title>
   
           <sidebar>
  -          <strong><a href="index.html">Cvs logs</a></strong>
  -          <ul>
  -            <xsl:for-each select="../module">
  -              <xsl:sort select="@name"/>
  -              <li>
  -                <a href="cvs_{@name}.html"><xsl:value-of select="@name"/></a>
  -              </li>
  -            </xsl:for-each>
  -          </ul>
  +          <include file="{$logdir}/cvslog.list"/>
           </sidebar>
   
           <menu>
  
  
  
  1.31      +48 -41    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.30
  retrieving revision 1.31
  diff -u -r1.30 -r1.31
  --- win2k.xsl 2001/10/21 11:52:55     1.30
  +++ win2k.xsl 2001/10/23 19:35:52     1.31
  @@ -232,7 +232,7 @@
     <!-- =================================================================== -->
   
     <xsl:template match="logic">
  -    <xsl:text>echo ^&lt;XMP^> %OUT%&#10;</xsl:text>
  +    <xsl:text>echo ^&lt;XMP^&gt; %OUT%&#10;</xsl:text>
   
       <xsl:text>:</xsl:text>
       <xsl:value-of select="@name"/>
  @@ -241,7 +241,7 @@
       <xsl:apply-templates/>
   
       <xsl:text>if not "%1"=="all" goto eoj&#10;</xsl:text>
  -    <xsl:text>echo ^&lt;/XMP^> %OUT%&#10;</xsl:text>
  +    <xsl:text>echo ^&lt;/XMP^&gt; %OUT%&#10;</xsl:text>
   
       <xsl:text>:end_</xsl:text>
       <xsl:value-of select="@name"/>
  @@ -275,9 +275,9 @@
       <xsl:text>IF "%STATUS%"=="SUCCESS" SET STYLE=&#10;</xsl:text>
       <xsl:text>IF "%STATUS%"=="FAILED" </xsl:text>
       <xsl:text>SET STYLE= class="fail"&#10;</xsl:text>
  -    <xsl:text>echo ^&lt;td%STYLE%^> %OUT%&#10;</xsl:text>
  +    <xsl:text>echo ^&lt;td%STYLE%^&gt; %OUT%&#10;</xsl:text>
       <xsl:apply-templates/>
  -    <xsl:text>echo ^&lt;/td^> %OUT%&#10;</xsl:text>
  +    <xsl:text>echo ^&lt;/td^&gt; %OUT%&#10;</xsl:text>
     </xsl:template>
   
     <!-- =================================================================== -->
  @@ -568,6 +568,26 @@
     </xsl:template>
   
     <!-- =================================================================== -->
  +  <!--          support for capturing and including static text            --> 
  +  <!-- =================================================================== -->
  +
  +  <xsl:template match="output">
  +    <xsl:text>SET OUT=^&gt;^&gt;</xsl:text>
  +    <xsl:value-of select="translate(@file,'/','\')"/>
  +    <xsl:text>&#10;</xsl:text>
  +
  +    <xsl:apply-templates/>
  +  </xsl:template>
  +
  +  <xsl:template match="include">
  +    <xsl:text>type </xsl:text>
  +    <xsl:value-of select="translate(@file,'/','\')"/>
  +    <xsl:text> %OUT%&#10;</xsl:text>
  +
  +    <xsl:apply-templates/>
  +  </xsl:template>
  +
  +  <!-- =================================================================== -->
     <!--                 default catchers for html and text                  -->
     <!-- =================================================================== -->
   
  @@ -580,7 +600,7 @@
   
       <xsl:text>echo ^&lt;html^%OUT%&#10;</xsl:text>
       <xsl:apply-templates/>
  -    <xsl:text>echo ^&lt;/html^> %OUT%&#10;</xsl:text>
  +    <xsl:text>echo ^&lt;/html^&gt; %OUT%&#10;</xsl:text>
   
       <xsl:if test="ancestor::html/@log">
         <xsl:text>SET OUT=^&gt;^&gt;</xsl:text>
  @@ -607,7 +627,7 @@
         <xsl:text>="</xsl:text>
         <xsl:call-template name="escape">
            <xsl:with-param name="string">
  -           <xsl:value-of select="."/>
  +           <xsl:value-of select="normalize-space(.)"/>
            </xsl:with-param>
          </xsl:call-template>
         <xsl:text>"</xsl:text>
  @@ -623,7 +643,7 @@
           <xsl:text>^&gt;</xsl:text>
           <xsl:call-template name="escape">
             <xsl:with-param name="string">
  -            <xsl:value-of select="."/>
  +            <xsl:value-of select="normalize-space(.)"/>
             </xsl:with-param>
           </xsl:call-template>
           <xsl:text>^&lt;/</xsl:text>
  @@ -654,44 +674,31 @@
   
     <xsl:template name="escape">
       <xsl:param name="string"/>
  -    <xsl:call-template name="escape-percent">
  -      <xsl:with-param name="string">
  -        <xsl:call-template name="escape-ampersand">
  -          <xsl:with-param name="string">
  -            <xsl:value-of select="normalize-space($string)"/>
  -          </xsl:with-param>
  -        </xsl:call-template>
  -      </xsl:with-param>
  -    </xsl:call-template>
  -  </xsl:template>
   
  -  <xsl:template name="escape-percent">
  -    <xsl:param name="string"/>
  -    <xsl:choose>
  -      <xsl:when test="contains($string,'%')">
  -        <xsl:value-of select="substring-before($string, '%')"/>
  -        <xsl:text>%%</xsl:text>
  -        <xsl:call-template name="escape-percent">
  -           <xsl:with-param name="string">
  -             <xsl:value-of select="substring-after($string, '%')"/>
  -           </xsl:with-param>
  -        </xsl:call-template>
  -      </xsl:when>
  -      <xsl:otherwise>
  -        <xsl:value-of select="$string"/>
  -      </xsl:otherwise>
  -    </xsl:choose>
  -  </xsl:template>
  +    <xsl:variable name="special"><![CDATA[%&]]></xsl:variable>
  +    <xsl:variable name="work" select="translate($string,$special,'%%')"/>
   
  -  <xsl:template name="escape-ampersand">
  -    <xsl:param name="string"/>
       <xsl:choose>
  -      <xsl:when test="contains($string,'&amp;')">
  -        <xsl:value-of select="substring-before($string, '&amp;')"/>
  -        <xsl:text>^&amp;</xsl:text>
  -        <xsl:call-template name="escape-ampersand">
  +      <xsl:when test="contains($work,'%')">
  +
  +        <xsl:variable name="pre" select="substring-before($work, '%')"/>
  +        <xsl:variable name="char"
  +           select="substring($string, string-length($pre)+1,1)"/>
  +
  +        <xsl:value-of select="$pre"/>
  +
  +        <xsl:choose>
  +          <xsl:when test="$char='%'">
  +            <xsl:text>%%</xsl:text>
  +          </xsl:when>
  +          <xsl:otherwise>
  +            <xsl:text>^&amp;</xsl:text>
  +          </xsl:otherwise>
  +        </xsl:choose>
  +
  +        <xsl:call-template name="escape">
              <xsl:with-param name="string">
  -             <xsl:value-of select="substring-after($string, '&amp;')"/>
  +             <xsl:value-of select="substring-after($string, $char)"/>
              </xsl:with-param>
           </xsl:call-template>
         </xsl:when>
  
  
  

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

Reply via email to