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/stylesheets changes2document.xsl
Date Sun, 21 Sep 2003 09:17:22 GMT
jefft       2003/09/21 02:17:22

  Modified:    .        status.xml
               src/resources/stylesheets changes2document.xsl
  Log:
  Fix half-baked handling of comma-separated bug ids
  
  Revision  Changes    Path
  1.222     +4 -1      xml-forrest/status.xml
  
  Index: status.xml
  ===================================================================
  RCS file: /home/cvs/xml-forrest/status.xml,v
  retrieving revision 1.221
  retrieving revision 1.222
  diff -u -r1.221 -r1.222
  --- status.xml	21 Sep 2003 09:13:07 -0000	1.221
  +++ status.xml	21 Sep 2003 09:17:22 -0000	1.222
  @@ -25,6 +25,9 @@
   
     <changes>
       <release version="0.6-dev" date="unreleased">
  +      <action dev="JT" type="fix" context="skins">
  +        Fixed URLs for comma-separated bug keys in status.xml
  +      </action>
         <action dev="JT" type="fix" context="shbat" fixes-bug="FOR-47, FOR-48">
           Fix bugs in forrest.bat|sh scripts encountered when used in
           odd environments (perl and Win9x).
  
  
  
  1.20      +42 -16    xml-forrest/src/resources/stylesheets/changes2document.xsl
  
  Index: changes2document.xsl
  ===================================================================
  RCS file: /home/cvs/xml-forrest/src/resources/stylesheets/changes2document.xsl,v
  retrieving revision 1.19
  retrieving revision 1.20
  diff -u -r1.19 -r1.20
  --- changes2document.xsl	14 Sep 2003 14:15:26 -0000	1.19
  +++ changes2document.xsl	21 Sep 2003 09:17:22 -0000	1.20
  @@ -6,11 +6,11 @@
   
    <xsl:import href="copyover.xsl"/>
    
  - <xsl:param name="bugtracking-url"/>
   
    <!-- FIXME (JJP):  bugzilla is hardwired -->
  - <xsl:variable name="bugzilla" select="'http://nagoya.apache.org/bugzilla/'"/>
  - <xsl:variable name="buglist" select="concat($bugzilla, 'buglist.cgi?bug_id=')"/>
  + <xsl:variable name="bugzilla" select="'http://nagoya.apache.org/bugzilla/buglist.cgi?bug_id='"/>
  +
  + <xsl:param name="bugtracking-url" select="$bugzilla"/>
   
    <xsl:template match="/">
     <xsl:apply-templates select="//changes"/>
  @@ -63,22 +63,48 @@
      </xsl:if>
   
      <xsl:if test="@fixes-bug">
  -    <xsl:text> Fixes </xsl:text>
  -    <xsl:choose>
  -     <xsl:when test="contains(@fixes-bug, ',')">
  -      <link href="{$buglist}{translate(normalize-space(@fixes-bug),' ','')}">
  -       <xsl:text>bugs </xsl:text><xsl:value-of select="normalize-space(@fixes-bug)"/>
  -      </link>
  +     <xsl:text> Fixes </xsl:text>
  +     <xsl:call-template name="print-bugs">
  +       <xsl:with-param name="buglist" select="translate(normalize-space(@fixes-bug),'
','')"/>
  +     </xsl:call-template>
  +     <!--
  +     <xsl:choose>
  +       <xsl:when test="contains(@fixes-bug, ',')">
  +         <!-<link href="{$bugtracking-url}{translate(normalize-space(@fixes-bug),'
','')}">->
  +           <link href="{$bugtracking-url}">
  +             <xsl:text>bugs </xsl:text><xsl:value-of select="normalize-space(@fixes-bug)"/>
  +           </link>
  +         </xsl:when>
  +         <xsl:otherwise>
  +           <link href="{$bugtracking-url}{@fixes-bug}">
  +             <xsl:text>bug </xsl:text><xsl:value-of select="@fixes-bug"/>
  +           </link>
  +         </xsl:otherwise>
  +       </xsl:choose>
  +       -->
  +       <xsl:text>.</xsl:text>
  +     </xsl:if>
  +   </li>
  + </xsl:template>
  +
  + <!-- Print each bug id in a comma-separated list -->
  + <xsl:template name="print-bugs">
  +   <xsl:param name="buglist"/>
  +   <xsl:choose>
  +     <xsl:when test="contains($buglist, ',')">
  +       <xsl:variable name="current" select="substring-before($buglist, ',')"/>
  +       <link href="{concat($bugtracking-url, $current)}">
  +         <xsl:value-of select="$current"/>
  +       </link>
  +       <xsl:text>, </xsl:text>
  +       <xsl:call-template name="print-bugs">
  +         <xsl:with-param name="buglist" select="substring-after($buglist, ',')"/>
  +       </xsl:call-template>
        </xsl:when>
        <xsl:otherwise>
  -      <link href="{$bugtracking-url}{@fixes-bug}">
  -       <xsl:text>bug </xsl:text><xsl:value-of select="@fixes-bug"/>
  -      </link>
  +       <link href="{concat($bugtracking-url, $buglist)}"><xsl:value-of select="$buglist"/></link>
        </xsl:otherwise>
  -    </xsl:choose>
  -    <xsl:text>.</xsl:text>
  -   </xsl:if>
  -  </li>
  +   </xsl:choose>
    </xsl:template>
   
   </xsl:stylesheet>
  
  
  

Mime
View raw message