| <xsl:stylesheet version = '1.0' |
| xmlns:xsl='http://www.w3.org/1999/XSL/Transform' |
| xmlns:msxsl="urn:schemas-microsoft-com:xslt" |
| xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
| xmlns:cvs="http://releng.wtp.eclipse.org/cvstools" |
| xsi:schemaLocation="./cvstools.xsd |
| http://www.w3.org/1999/XSL/Transform |
| http://www.w3.org/1999/XSL/Transform.xsd |
| http://www.w3.org/1999/xhtml |
| http://www.w3.org/1999/xhtml.xsd"> |
| <xsl:output method="html" encoding="ISO-8859-1"/> |
| |
| <!-- set default values here, and also in php script wrapper--> |
| <xsl:param name="iesDate"></xsl:param> |
| <xsl:param name="drvDate"></xsl:param> |
| <xsl:param name="cvsServer">http://dev.eclipse.org</xsl:param> |
| <xsl:param name="source"/> |
| |
| <!-- points to a specific bug's logfile; not the same as Bugzilla, which is filterName4 --> |
| <xsl:param name="bug"/> |
| |
| <xsl:param name="sortMethod1">date</xsl:param> |
| <xsl:param name="sortDir1">descending</xsl:param> |
| <xsl:param name="sortMethod2">file</xsl:param> |
| <xsl:param name="sortDir2">ascending</xsl:param> |
| |
| <!-- up to 5 different filters can be applied --> |
| <xsl:param name="filterName1">File</xsl:param> |
| <xsl:param name="filterVal1"></xsl:param> |
| <xsl:param name="filterName2">Date</xsl:param> |
| <xsl:param name="filterVal2"></xsl:param> |
| <xsl:param name="filterName3">Author</xsl:param> |
| <xsl:param name="filterVal3"></xsl:param> |
| <xsl:param name="filterName4">Bugzilla</xsl:param> |
| <xsl:param name="filterVal4"></xsl:param> |
| <xsl:param name="filterName5">Comments</xsl:param> |
| <xsl:param name="filterVal5"></xsl:param> |
| |
| <xsl:param name="CVSPREWTP">http://dev.eclipse.org/viewcvs/indexwebtools.cgi/%7Echeckout%7E/org.eclipse.wtp.releng/org.eclipse.wtp.releng.cvs.tools/</xsl:param> |
| |
| <xsl:template match="/"> |
| <xsl:for-each select="cvs:rlog"> |
| <html> |
| <head> |
| <title>Eclipse Web Tools Platform: What`s New, CVS?</title> |
| <style>@import url("../whatsnew-cvs.css");</style> |
| </head> |
| <body> |
| <a name="top"> </a> |
| <b class="big-header"> |
| <xsl:choose> |
| <xsl:when test="$drvDate=cvs:startdate and $iesDate=cvs:startdate"> |
| Between Last Uploaded Driver & IES Refresh On <b class="navy"><xsl:value-of select="cvs:startdate" /></b> and <b class="navy"><xsl:value-of select="cvs:enddate" /></b> |
| </xsl:when> |
| <xsl:when test="$drvDate=cvs:startdate"> |
| Between Uploaded Driver On <b class="navy"><xsl:value-of select="cvs:startdate" /></b> and <b class="navy"><xsl:value-of select="cvs:enddate" /></b> |
| </xsl:when> |
| <xsl:when test="$iesDate=cvs:startdate"> |
| Between Last IES Refresh On <b class="navy"><xsl:value-of select="cvs:startdate" /></b> and <b class="navy"><xsl:value-of select="cvs:enddate" /></b> |
| </xsl:when> |
| <xsl:otherwise> |
| Between |
| <b class="navy"> |
| <xsl:choose> |
| <xsl:when test="contains(cvs:startdate,'00:00:00')"> |
| <xsl:value-of select="substring-before(cvs:startdate,'00:00:00')"/> |
| </xsl:when> |
| <xsl:otherwise> |
| <xsl:value-of select="cvs:startdate"/> |
| </xsl:otherwise> |
| </xsl:choose> |
| </b> and |
| <b class="navy"><xsl:value-of select="cvs:enddate"/></b> |
| </xsl:otherwise> |
| </xsl:choose> |
| </b> |
| <h4 class="green">CVS Deltas: <xsl:value-of select="cvs:counts/cvs:numDeltas"/>, Revisions: <xsl:value-of select="cvs:counts/cvs:numRevisions"/></h4> |
| |
| <table width="98%" border="0"> |
| <tr> |
| <td><b></b></td> <!-- # --> |
| <td><b>Group</b></td> |
| <td align="right"><b>C</b></td> <!-- link to CVS parent folder --> |
| <td align="center"><b>V</b></td> <!-- link to CVS script detail page --> |
| <td align="left"><b>S</b></td> <!-- link to CVS source (~checkout~) page --> |
| |
| <xsl:for-each select="document('whatsnew-cvs.columns.xml')/cols"> |
| <xsl:apply-templates select="colgroup"/> |
| </xsl:for-each> |
| </tr> |
| <xsl:for-each select="cvs:cvsdelta"> |
| |
| |
| <xsl:if test="contains('1','1')"> |
| <tr valign="top"> |
| <xsl:choose> |
| <xsl:when test="(position() mod 2 = 1)"> |
| <xsl:attribute name="class">dark-row</xsl:attribute> |
| </xsl:when> |
| <xsl:otherwise> |
| <xsl:attribute name="class">light-row</xsl:attribute> |
| </xsl:otherwise> |
| </xsl:choose> |
| |
| <td align="right"><a name="{position()}"><xsl:value-of select="concat(position(),'.')" /></a></td> |
| |
| <xsl:variable name="fileNoCVSRoot"><xsl:choose> |
| <xsl:when test="starts-with(cvs:file,'/cvsroot/webtools')"> |
| <xsl:value-of select="substring-after(cvs:file,'/cvsroot/webtools')" /> |
| </xsl:when> |
| <xsl:otherwise><xsl:value-of select="cvs:file" /></xsl:otherwise> |
| </xsl:choose></xsl:variable> |
| <xsl:variable name="file"><xsl:value-of select="cvs:file" /></xsl:variable> |
| <xsl:variable name="projPath"><xsl:choose> |
| <xsl:when test="contains(cvs:file,'jst.')">/viewcvs/indexwebtools.cgi/~checkout~</xsl:when> |
| <xsl:when test="contains(cvs:file,'wst.')">/viewcvs/indexwebtools.cgi/~checkout~</xsl:when> |
| <xsl:otherwise>/viewcvs/index.cgi/~checkout~</xsl:otherwise> |
| </xsl:choose></xsl:variable> |
| <xsl:variable name="projDetailPath"><xsl:choose> |
| <xsl:when test="contains(cvs:file,'jst.')">/viewcvs/indexwebtools.cgi</xsl:when> |
| <xsl:when test="contains(cvs:file,'wst.')">/viewcvs/indexwebtools.cgi</xsl:when> |
| <xsl:otherwise>/viewcvs/index.cgi</xsl:otherwise> |
| </xsl:choose></xsl:variable> |
| <xsl:variable name="cvsPath"><xsl:value-of select="concat($cvsServer,$projPath,$fileNoCVSRoot)" /></xsl:variable> |
| <xsl:variable name="cvsDetailPath"><xsl:value-of select="concat($cvsServer,$projDetailPath,$fileNoCVSRoot)" /></xsl:variable> |
| |
| <xsl:for-each select="document('whatsnew-cvs.substitutions.xml')/subs/sub"> |
| <xsl:variable name="proj"><xsl:value-of select="substring-before(path,concat('/',catg))" /></xsl:variable> |
| <xsl:variable name="projNoCVSRoot"><xsl:choose> |
| <xsl:when test="starts-with($proj,'/cvsroot/webtools')"> |
| <xsl:value-of select="substring-after($proj,'/cvsroot/webtools')" /> |
| </xsl:when> |
| <xsl:otherwise><xsl:value-of select="$proj" /></xsl:otherwise> |
| </xsl:choose></xsl:variable> |
| <xsl:choose> |
| <xsl:when test="starts-with($file,path)"> |
| <td><a target="_cvs" class="black-no-underline" href="{concat($cvsServer,$projPath,$projNoCVSRoot,'/',catg)}"><b><xsl:value-of select="catg" /></b></a></td> |
| <td width="15"><a target="_cvs" class="black-no-underline" href="{concat($cvsServer,$projPath,$projNoCVSRoot,'/',catg)}"><img border="0" alt="CVS project folder" src="../icon-folder.gif"/></a></td> |
| </xsl:when> |
| <xsl:otherwise> |
| </xsl:otherwise> |
| </xsl:choose> |
| </xsl:for-each> |
| <!-- file links --> |
| <td width="14"><a target="_cvs" class="black-no-underline" href="{$cvsDetailPath}"><img border="0" alt="CVS file details" src="../icon-file-detail.gif"/></a></td> |
| <td width="13"><a target="_cvs" class="black-no-underline" href="{$cvsPath}"><img border="0" alt="CVS file source (or download)" src="../icon-file.gif"/></a></td> |
| <td colspan="1"><a target="_cvs" class="black-no-underline" href="{$cvsPath}"><xsl:value-of select="translate(substring-after($fileNoCVSRoot,path),'/',' ')" /></a></td> |
| <td><table> |
| <xsl:for-each select="cvs:revisions"> |
| |
| <xsl:for-each select="cvs:revision"> |
| <td colspan="1"><xsl:value-of select="cvs:rev" /></td> |
| <td colspan="1"><xsl:value-of select="cvs:date" /></td> |
| <td colspan="1"><xsl:value-of select="cvs:comments" /></td> |
| <td colspan="1"> |
| [<a class="green-no-underline" href="https://bugs.eclipse.org/bugs/show_bug.cgi?id={cvs:bugzilla}" target="_bugz"><xsl:value-of select="cvs:bugzilla"/></a>]</td> |
| |
| |
| </xsl:for-each></xsl:for-each> |
| </table></td> |
| </tr></xsl:if> </xsl:for-each> |
| </table> |
| </body> |
| </html> |
| </xsl:for-each> |
| </xsl:template> |
| |
| <xsl:template match="cvs:rev"> |
| <xsl:if test="string(.)='1.1'"> <!-- simple case, 1.1 --> |
| <xsl:value-of select="1.1" /> |
| </xsl:if> |
| <xsl:if test="string(.)!='1.1'"> |
| <xsl:choose> |
| <xsl:when test="contains(substring-after(substring-after(.,'.'),'.'),'.') and substring(.,string-length(.),1)!='1'"> |
| <!-- check if 1.6.2.2 : 1.6.2 . (2-1) : 1.6.2.1 --> |
| <xsl:value-of select="concat( |
| substring(.,1,string-length(.)-2), |
| '.', |
| number(substring(.,string-length(.)))-1 |
| )"/> |
| </xsl:when> |
| <xsl:when test="contains(substring-after(substring-after(.,'.'),'.'),'.') and substring(.,string-length(.),1)='1'"> |
| <!-- check if 1.6.2.1 : 1 . 6 : 1.6 --> |
| <xsl:value-of select="concat( |
| substring-before(.,'.'), |
| '.', |
| substring-before(substring-after(.,'.'),'.') |
| )"/> |
| </xsl:when> |
| <xsl:when test="contains(substring-after(.,'.'),'.') and substring(.,string-length(.),1)!='1'"> |
| <!-- check if 1.5.4 : 1.5 . (4-1) : 1.5.3 [is this a valid cvs range?] --> |
| <xsl:value-of select="concat( |
| substring(.,1,string-length(.)-2), |
| '.', |
| number(substring(.,string-length(.)))-1 |
| )"/> |
| </xsl:when> |
| <xsl:when test="contains(substring-after(.,'.'),'.') and substring(.,string-length(.),1)='1'"> |
| <!-- check if 1.5.1 : 1 . (5-1) : 1.4 [is this a valid cvs range?] --> |
| <xsl:value-of select="concat( |
| substring-before(.,'.'), |
| '.', |
| string(floor(number(substring-after(.,'.'))) - 1) |
| )"/> |
| </xsl:when> |
| <xsl:otherwise> |
| <!-- check if 1.40 : 1 . (40-1) : 1.39 --> |
| <xsl:value-of select="concat( |
| substring-before(.,'.'), |
| '.', |
| number(substring-after(.,'.'))-1 |
| )"/> |
| </xsl:otherwise> |
| </xsl:choose> |
| </xsl:if> |
| </xsl:template> |
| |
| <xsl:template match="colgroup"> |
| <xsl:choose> |
| <xsl:when test="col/meth1"> |
| <td colspan="1"><table cellspacing="2" cellpadding="0" border="0"><tr> |
| <xsl:for-each select="col"> |
| <xsl:variable name="colStyle"> |
| <xsl:choose> |
| <xsl:when test="$sortMethod1=meth1 and $sortMethod2=meth2">red-no-underline</xsl:when> |
| <xsl:otherwise>black-no-underline</xsl:otherwise> |
| </xsl:choose> |
| </xsl:variable> |
| <xsl:variable name="arr1"> |
| <xsl:choose> |
| <xsl:when test="$sortMethod1=meth1 and $sortMethod2=meth2 and $sortDir1='ascending'">arr-up-red</xsl:when> |
| <xsl:when test="$source=''">c</xsl:when> |
| <xsl:otherwise>arr-up</xsl:otherwise> |
| </xsl:choose> |
| </xsl:variable> |
| <xsl:variable name="arr2"> |
| <xsl:choose> |
| <xsl:when test="$sortMethod1=meth1 and $sortMethod2=meth2 and $sortDir1='descending'">arr-dn-red</xsl:when> |
| <xsl:when test="$source=''">c</xsl:when> |
| <xsl:otherwise>arr-dn</xsl:otherwise> |
| </xsl:choose> |
| </xsl:variable> |
| <xsl:variable name="methlabel"> |
| <xsl:if test="meth1='NONE'"> |
| <xsl:value-of select="meth2" /> |
| </xsl:if> |
| <xsl:if test="meth1!='NONE'"> |
| <xsl:value-of select="meth1" /> |
| </xsl:if> |
| </xsl:variable> |
| <xsl:variable name="dir2"> |
| <xsl:if test="meth1!='NONE'">ascending</xsl:if> <!-- if secondary sort, should be ascending --> |
| </xsl:variable> |
| <td width="25" align="right"> |
| <xsl:if test="$source!=''"> |
| <a class="{$colStyle}" href="news-whatsnew-cvs.php?source={$source}&bug={$bug}&{$filterName1}={$filterVal1}&{$filterName2}={$filterVal2}&{$filterName3}={$filterVal3}&{$filterName4}={$filterVal4}&{$filterName5}={$filterVal5}&sortMethod1={meth1}&sortDir1=descending&sortMethod2={meth2}&sortDir2=descending"><b><xsl:value-of select="title" /></b></a> |
| </xsl:if> |
| <xsl:if test="$source=''"> |
| <span class="{$colStyle}"><b><xsl:value-of select="title" /></b></span> |
| </xsl:if> |
| </td> |
| <xsl:if test="$source!=''"> |
| <xsl:choose> |
| <xsl:when test="$filterName1=title"> |
| <td><input type="text" name="{$filterName1}" value="{$filterVal1}" size="4"/></td> |
| </xsl:when> |
| <xsl:when test="$filterName2=title"> |
| <td><input type="text" name="{$filterName2}" value="{$filterVal2}" size="4"/></td> |
| </xsl:when> |
| <xsl:when test="$filterName3=title"> |
| <td><input type="text" name="{$filterName3}" value="{$filterVal3}" size="4"/></td> |
| </xsl:when> |
| <xsl:when test="$filterName4=title"> |
| <td><input type="text" name="{$filterName4}" value="{$filterVal4}" size="4"/></td> |
| </xsl:when> |
| <xsl:when test="$filterName5=title"> |
| <td><input type="text" name="{$filterName5}" value="{$filterVal5}" size="4"/></td> |
| </xsl:when> |
| <xsl:otherwise></xsl:otherwise> |
| </xsl:choose> |
| </xsl:if> |
| <td width="10" align="left"> |
| <xsl:if test="$source!=''"> |
| <a href="news-whatsnew-cvs.php?source={$source}&bug={$bug}&{$filterName1}={$filterVal1}&{$filterName2}={$filterVal2}&{$filterName3}={$filterVal3}&{$filterName4}={$filterVal4}&{$filterName5}={$filterVal5}&sortMethod1={meth1}&sortDir1=ascending&sortMethod2={meth2}&sortDir2=ascending"><img height="4" src="{$CVSPREWTP}images/{$arr1}.gif" border="" alt="sort by {$methlabel} ascending"/></a> |
| <br/><img src="{$CVSPREWTP}images/c.gif" width="1" height="2"/><br/> |
| <a href="news-whatsnew-cvs.php?source={$source}&bug={$bug}&{$filterName1}={$filterVal1}&{$filterName2}={$filterVal2}&{$filterName3}={$filterVal3}&{$filterName4}={$filterVal4}&{$filterName5}={$filterVal5}&sortMethod1={meth1}&sortDir1=descending&sortMethod2={meth2}&sortDir2=descending"><img height="4" src="{$CVSPREWTP}images/{$arr2}.gif" border="" alt="sort by {$methlabel} descending"/></a> |
| </xsl:if> |
| <xsl:if test="$source=''"> |
| <img height="4" src="{$CVSPREWTP}images/{$arr1}.gif" border="" alt="sort by {$methlabel} ascending"/> |
| <br/><img src="{$CVSPREWTP}images/c.gif" width="1" height="2"/><br/> |
| <img height="4" src="{$CVSPREWTP}images/{$arr2}.gif" border="" alt="sort by {$methlabel} descending"/> |
| </xsl:if> |
| </td> |
| <td width="1" align="left"><img src="{$CVSPREWTP}images/c.gif" width="10" height="1"/></td> |
| </xsl:for-each> |
| <xsl:if test="$source!=''"> |
| <td><input class="black-no-underline" type="submit" name="z" value="Go!"/></td> |
| </xsl:if> |
| </tr></table></td> |
| </xsl:when> |
| <xsl:otherwise> |
| <td width="10"><b><xsl:value-of select="col/title" /></b></td> |
| </xsl:otherwise> |
| </xsl:choose> |
| |
| </xsl:template> |
| </xsl:stylesheet> |