-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #919 from troy2914/i917_samps_post_multigroups
cleanup the xsl based on group stuff done in #900
- Loading branch information
Showing
11 changed files
with
197 additions
and
549 deletions.
There are no files selected for viewing
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,20 +7,17 @@ does not exist, it falls back to the data/xsl directory under the | |
pc2 installation directory. | ||
|
||
index.xsl | ||
Sample index as used at the ACM-ICPC Pacific Northwest Contest. | ||
Includes links to group?.html files | ||
group1.xsl | ||
groupN.xsl | ||
Sample per-group(region/site) files. group1.xsl is for the | ||
1st group defined in PC^2. Copy and replace the N with the | ||
additional groups (eg the 2nd group is 2 and would be in group2.xsl) | ||
Sample index as used at the ICPC Pacific Northwest Contest. | ||
Includes links to group_*.html files | ||
group.xsl | ||
Sample per-group(region/site) files (based on the groupList/group[included = 1]. | ||
|
||
or | ||
wf.index.xsl | ||
Like the summary.html, but with the ACM-ICPC World Finals ranking | ||
Like the summary.html, but with the ICPC World Finals ranking | ||
system. Includes links to the group?.html files | ||
wf.groupN.xsl | ||
Like the above groupN.xsl, except with ACM-ICPC World Finals | ||
wf.group.xsl | ||
Like the above group.xsl, except with ICPC World Finals | ||
ranking system. | ||
wf.standings.xsl | ||
The end of the contest final standings with Honorable Mention and | ||
|
@@ -33,5 +30,3 @@ call this index.xsl/group.xsl (eg remove the "wf." part). | |
|
||
Questions? | ||
email to [email protected] | ||
|
||
# $Id$ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,185 +1,162 @@ | ||
<!-- $Id: index.xsl 2717 2013-11-09 03:42:38Z boudreat $ --> | ||
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> | ||
<xsl:output method="html" indent="yes"/> | ||
<xsl:decimal-format decimal-separator="." grouping-separator="," /> | ||
<!-- | ||
change gtProblem to match the problem id that is 1 less | ||
than we want for division2 (condition: > $gtProblem) | ||
--> | ||
<xsl:variable name="gtProblem" select="'2'" /> | ||
<xsl:template match="contestStandings"> | ||
<HTML> | ||
<HEAD> | ||
<TITLE> | ||
<xsl:value-of select="/contestStandings/standingsHeader/@title"/> | ||
</TITLE> | ||
<link rel="stylesheet" type="text/css" href="standings.css"/> | ||
<META HTTP-EQUIV="REFRESH" CONTENT="60;"/> | ||
<META HTTP-EQUIV="EXPIRES" CONTENT="0"/> | ||
<META HTTP-EQUIV="CACHE-CONTROL" CONTENT="NO-CACHE"/> | ||
<META HTTP-EQUIV="PRAGMA" CONTENT="NO-CACHE"/> | ||
</HEAD> | ||
<BODY> | ||
<font face="verdana, arial, helvetica" align="right"> | ||
<center> | ||
<IMG style="width: 1386px; height: 248px;" SRC="regional-header.png" align="center"/> | ||
<h2><xsl:value-of select="/contestStandings/standingsHeader/@title"/><br/>Division 2 Standings</h2> | ||
<h3></h3> | ||
  | ||
<br/> | ||
<xsl:value-of select="/contestStandings/standingsHeader/@scoreboardMessage"/> | ||
<br/> | ||
<br/> | ||
<xsl:for-each select="/contestStandings/standingsHeader/groupList/group[@id mod 2 = 0]"> | ||
<xsl:call-template name="groupLink"> | ||
<xsl:with-param name="group" select="@id"/> | ||
</xsl:call-template> | ||
</xsl:for-each> | ||
<br/> | ||
<a href="index1.html">Goto Division 1 Standings</a> | ||
|
||
<br/> | ||
<br/> | ||
<a href="pacnw_div2.pdf">Division 2 Problem Descriptions</a> | ||
  | ||
  | ||
|
||
<a href="sampled2.zip">Sample Division 2 Data</a> | ||
  | ||
  | ||
<A HREF="TechNotes.pdf">Technical Notes</A> | ||
<br/> | ||
<br/> | ||
</center> | ||
</font> | ||
<center> | ||
<TABLE cellspacing="0"> | ||
<tr><th><strong><u>Rank</u></strong></th> | ||
<th><strong><u>Name</u></strong></th> | ||
<th><strong><u>Solved</u></strong></th> | ||
<th><strong><u>Time</u></strong></th> | ||
<xsl:call-template name="problemTitle"/> | ||
<th>Total att/solv</th></tr> | ||
<tr><td></td><td></td><td></td><td></td> | ||
<xsl:call-template name="problemColor"/> | ||
</tr> | ||
<xsl:call-template name="teamStanding"/> | ||
<xsl:call-template name="summary"/> | ||
</TABLE> | ||
</center> | ||
<div class="tail"> | ||
|
||
<span class="right"> | ||
<A HREF="https://pc2ccs.github.io/">PC^2 Homepage</A><br/> | ||
CSS by Tomas Cerny and Ray Holder | ||
</span> | ||
Created by <A HREF="https://pc2ccs.github.io/">CSUS PC^2</A> version <xsl:value-of select="/contestStandings/standingsHeader/@systemVersion"/> | ||
<br/> | ||
Last updated | ||
<xsl:value-of select="/contestStandings/standingsHeader/@currentDate"/> | ||
</div> | ||
</BODY> | ||
</HTML> | ||
</xsl:template> | ||
|
||
<xsl:template name="summary"> | ||
<xsl:for-each select="standingsHeader"> | ||
<tr> | ||
<td></td> | ||
<td>Submitted/1st Yes/Total Yes</td> | ||
<td></td> | ||
<td></td> | ||
<xsl:call-template name="problemsummary"/> | ||
<td><xsl:value-of select="@totalAttempts"/>/<xsl:value-of select="@totalSolved"/></td> | ||
</tr> | ||
</xsl:for-each> | ||
</xsl:template> | ||
<xsl:template name="problemsummary"> | ||
<xsl:for-each select="/contestStandings/standingsHeader/problem[@id > $gtProblem]"> | ||
<!-- <problemsummary attempts="246" bestSolutionTime="25" id="1" lastsolutionTime="283" numberSolved="81" title="A+ Consanguine Calculations"/> --> | ||
<td> | ||
<xsl:attribute name="class">center</xsl:attribute> | ||
<xsl:value-of select="@attempts"/>/<xsl:if test="@numberSolved < '1'">--</xsl:if> | ||
<xsl:if test="@bestSolutionTime"><xsl:value-of select="@bestSolutionTime"/></xsl:if>/<xsl:value-of select="@numberSolved"/> | ||
</td> | ||
</xsl:for-each> | ||
</xsl:template> | ||
<xsl:template name="teamStanding"> | ||
<xsl:for-each select="teamStanding[@teamGroupId mod 2 = 0]"> | ||
<!-- index is 0 based header and 1st team seperated by colors --> | ||
<xsl:choose> | ||
<xsl:when test="@index mod 2 = 0"> | ||
<tr class="even"> | ||
<td><xsl:value-of select="@divisionRank"/></td> | ||
<td><xsl:value-of select="@teamName"/></td> | ||
<td> | ||
<xsl:attribute name="class">center</xsl:attribute> | ||
<xsl:value-of select="@solved"/></td> | ||
<td> | ||
<xsl:attribute name="class">right</xsl:attribute> | ||
<xsl:value-of select="@points"/></td> | ||
<xsl:call-template name="problemSummaryInfo"/> | ||
<!-- <teamStanding index="1" solved="8" problemsattempted="8" rank="1" score="1405" teamName="Warsaw University" timefirstsolved="13" timelastsolved="272" totalAttempts="19" userid="84" usersiteid="1"> --> | ||
<td><xsl:value-of select="@totalAttempts"/>/<xsl:value-of select="@solved"/></td> | ||
</tr> | ||
</xsl:when> | ||
<xsl:otherwise> | ||
<tr class="odd"> | ||
<td><xsl:value-of select="@divisionRank"/></td> | ||
<td><xsl:value-of select="@teamName"/></td> | ||
<td> | ||
<xsl:attribute name="class">center</xsl:attribute> | ||
<xsl:value-of select="@solved"/></td> | ||
<td> | ||
<xsl:attribute name="class">right</xsl:attribute> | ||
<xsl:value-of select="@points"/></td> | ||
<xsl:call-template name="problemSummaryInfo"/> | ||
<!-- <teamStanding index="1" solved="8" problemsattempted="8" rank="1" score="1405" teamName="Warsaw University" timefirstsolved="13" timelastsolved="272" totalAttempts="19" userid="84" usersiteid="1"> --> | ||
<td> | ||
<xsl:value-of select="@totalAttempts"/>/<xsl:value-of select="@solved"/></td> | ||
</tr> | ||
</xsl:otherwise> | ||
</xsl:choose> | ||
</xsl:for-each> | ||
</xsl:template> | ||
<xsl:template name="problemSummaryInfo"> | ||
<xsl:for-each select="problemSummaryInfo[@index > $gtProblem]"> | ||
<!-- <problemSummaryInfo attempts="1" index="1" problemid="1" score="73" solutionTime="73"/> --> | ||
<td> | ||
<xsl:if test="@isSolved = 'true'"> | ||
<xsl:attribute name="class">yes</xsl:attribute> | ||
</xsl:if> | ||
<xsl:if test="@isSolved = 'false' and @isPending = 'true'"> | ||
<xsl:attribute name="class">pending</xsl:attribute> | ||
</xsl:if> | ||
<xsl:if test="@isSolved = 'false' and @attempts > '0' and @isPending = 'false'"> | ||
<xsl:attribute name="class">no</xsl:attribute> | ||
</xsl:if> | ||
<xsl:if test="@isSolved = 'false' and @attempts = '0' and @isPending = 'false'"> | ||
<xsl:attribute name="class">center</xsl:attribute> | ||
</xsl:if> | ||
<xsl:value-of select="@attempts"/>/<xsl:if test="@isSolved = 'false'">--</xsl:if> | ||
<xsl:if test="@isSolved = 'true'"><xsl:value-of select="@solutionTime"/></xsl:if> | ||
</td> | ||
</xsl:for-each> | ||
</xsl:template> | ||
<xsl:template name="problemTitle"> | ||
<xsl:for-each select="/contestStandings/standingsHeader/problem[@id > $gtProblem]"> | ||
<th>    <strong><u><xsl:number format="A" value="@id"/></u></strong>    </th> | ||
</xsl:for-each> | ||
</xsl:template> | ||
<xsl:template name="problemColor"> | ||
<xsl:for-each select="/contestStandings/standingsHeader/colorList/colors[@siteNum = 1]/problem[@id > $gtProblem]"> | ||
<td><center><xsl:choose><xsl:when test="@color"> <xsl:value-of select="@color"/></xsl:when><xsl:otherwise>Color<xsl:value-of select="@id"/></xsl:otherwise></xsl:choose></center></td> | ||
</xsl:for-each> | ||
</xsl:template> | ||
<xsl:template name="groupLink"> | ||
<xsl:param name="group"/> | ||
<xsl:for-each select="/contestStandings/standingsHeader/groupList/group[@id = $group]"> | ||
<a href="group{$group}.html"><xsl:value-of select="@title"/> Per Site Standings | ||
</a> | ||
<br/> | ||
</xsl:for-each> | ||
</xsl:template> | ||
|
||
</xsl:stylesheet> | ||
<!-- Copyright (C) 1989-2024 PC2 Development Team: John Clevenger, Douglas Lane, Samir Ashoo, and Troy Boudreau. --> | ||
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> | ||
<xsl:output method="html" indent="yes"/> | ||
<xsl:decimal-format decimal-separator="." grouping-separator="," /> | ||
<!-- change group to match the group name --> | ||
<xsl:template match="contestStandings"> | ||
<xsl:variable name="group" select="standingsHeader/groupList/group[@included = 1]/@title" /> | ||
<HTML> | ||
<HEAD> | ||
<TITLE> | ||
<xsl:value-of select="@title"/> Full Info - <xsl:value-of select="/contestStandings/standingsHeader/@title"/> | ||
</TITLE> | ||
<link rel="stylesheet" type="text/css" href="standings.css"/> | ||
<META HTTP-EQUIV="REFRESH" CONTENT="60;"/> | ||
<META HTTP-EQUIV="EXPIRES" CONTENT="0"/> | ||
<META HTTP-EQUIV="CACHE-CONTROL" CONTENT="NO-CACHE"/> | ||
<META HTTP-EQUIV="PRAGMA" CONTENT="NO-CACHE"/> | ||
</HEAD> | ||
<BODY> | ||
<font face="verdana, arial, helvetica" align="right"> | ||
<center> | ||
<h2><xsl:value-of select="/contestStandings/standingsHeader/@title"/></h2> | ||
<h3><xsl:value-of select="/contestStandings/standingsHeader/groupList/group[@title = $group]/@title"/> per Site Standings</h3> | ||
  | ||
<!-- XXX probably can remove these with the full title --> | ||
<br/> | ||
<xsl:value-of select="/contestStandings/standingsHeader/@scoreboardMessage"/> | ||
</center> | ||
</font> | ||
<br/> | ||
<center> | ||
<xsl:variable name="division" select="substring-after($group, ' - ')"/> | ||
<a href="index_{$division}.html"><xsl:value-of select="$division"/> Overall Standings</a><br/><br/> | ||
<TABLE> | ||
<tr><th><strong><u>Rank</u></strong></th> | ||
<th><strong><u>Name</u></strong></th> | ||
<th><strong><u>Solved</u></strong></th> | ||
<th><strong><u>Time</u></strong></th> | ||
<xsl:call-template name="problemTitle"/> | ||
<th>Total att/solv</th></tr> | ||
<tr><td></td><td></td><td></td><td></td> | ||
<xsl:call-template name="problemColor"/> | ||
</tr> | ||
<xsl:call-template name="teamStanding"/> | ||
<xsl:call-template name="summary"/> | ||
</TABLE> | ||
</center> | ||
<div class="tail"> | ||
|
||
<span class="right"> | ||
<A HREF="https://pc2ccs.github.io/">PC^2 Homepage</A><br/> | ||
CSS by Tomas Cerny and Ray Holder | ||
</span> | ||
Created by <A HREF="https://pc2ccs.github.io/">CSUS PC^2 </A> version <xsl:value-of select="/contestStandings/standingsHeader/@systemVersion"/> | ||
<br/> | ||
Last updated | ||
<xsl:value-of select="/contestStandings/standingsHeader/@currentDate"/> | ||
</div> | ||
</BODY> | ||
</HTML> | ||
</xsl:template> | ||
<xsl:template name="summary"> | ||
<xsl:for-each select="standingsHeader"> | ||
<tr> | ||
<td></td> | ||
<td>Submitted/1st Yes/Total Yes</td> | ||
<td></td> | ||
<td></td> | ||
<xsl:call-template name="problemsummary"/> | ||
<td><xsl:value-of select="@totalAttempts"/>/<xsl:value-of select="@totalSolved"/></td> | ||
</tr> | ||
</xsl:for-each> | ||
</xsl:template> | ||
<xsl:template name="teamStanding"> | ||
<xsl:for-each select="teamStanding"> | ||
<!-- index is 0 based header and 1st team seperated by colors --> | ||
<xsl:choose> | ||
<xsl:when test="@index mod 2 = 0"> | ||
<tr class="even"> | ||
<td><xsl:value-of select="@rank"/></td> | ||
<td><xsl:value-of select="@teamName"/></td> | ||
<td> | ||
<xsl:attribute name="class">center</xsl:attribute> | ||
<xsl:value-of select="@solved"/></td> | ||
<td> | ||
<xsl:attribute name="class">right</xsl:attribute> | ||
<xsl:value-of select="@points"/></td> | ||
<xsl:call-template name="problemSummaryInfo"/> | ||
<!-- <teamStanding index="1" solved="8" problemsattempted="8" rank="1" score="1405" teamName="Warsaw University" timefirstsolved="13" timelastsolved="272" totalAttempts="19" userid="84" usersiteid="1"> --> | ||
<td><xsl:value-of select="@totalAttempts"/>/<xsl:value-of select="@solved"/></td> | ||
</tr> | ||
</xsl:when> | ||
<xsl:otherwise> | ||
<tr class="odd"> | ||
<td><xsl:value-of select="@rank"/></td> | ||
<td><xsl:value-of select="@teamName"/></td> | ||
<td> | ||
<xsl:attribute name="class">center</xsl:attribute> | ||
<xsl:value-of select="@solved"/></td> | ||
<td> | ||
<xsl:attribute name="class">right</xsl:attribute> | ||
<xsl:value-of select="@points"/></td> | ||
<xsl:call-template name="problemSummaryInfo"/> | ||
<!-- <teamStanding index="1" solved="8" problemsattempted="8" rank="1" score="1405" teamName="Warsaw University" timefirstsolved="13" timelastsolved="272" totalAttempts="19" userid="84" usersiteid="1"> --> | ||
<td> | ||
<xsl:value-of select="@totalAttempts"/>/<xsl:value-of select="@solved"/></td> | ||
</tr> | ||
</xsl:otherwise> | ||
</xsl:choose> | ||
</xsl:for-each> | ||
</xsl:template> | ||
<xsl:template name="problemSummaryInfo"> | ||
<xsl:for-each select="problemSummaryInfo"> | ||
<!-- <problemSummaryInfo attempts="1" index="1" problemid="1" score="73" solutionTime="73"/> --> | ||
<td> | ||
<xsl:if test="@isSolved = 'true'"> | ||
<xsl:attribute name="class">yes</xsl:attribute> | ||
</xsl:if> | ||
<xsl:if test="@isSolved = 'false' and @isPending = 'true'"> | ||
<xsl:attribute name="class">pending</xsl:attribute> | ||
</xsl:if> | ||
<xsl:if test="@isSolved = 'false' and @attempts > '0' and @isPending = 'false'"> | ||
<xsl:attribute name="class">no</xsl:attribute> | ||
</xsl:if> | ||
<xsl:if test="@isSolved = 'false' and @attempts = '0' and @isPending = 'false'"> | ||
<xsl:attribute name="class">center</xsl:attribute> | ||
</xsl:if> | ||
<xsl:value-of select="@attempts"/>/<xsl:if test="@isSolved = 'false'">--</xsl:if> | ||
<xsl:if test="@isSolved = 'true'"><xsl:value-of select="@solutionTime"/></xsl:if> | ||
</td> | ||
</xsl:for-each> | ||
</xsl:template> | ||
<xsl:template name="problemsummary"> | ||
<xsl:for-each select="/contestStandings/standingsHeader/problem"> | ||
<!-- <problemsummary attempts="246" bestSolutionTime="25" id="1" lastsolutionTime="283" numberSolved="81" title="A+ Consanguine Calculations"/> --> | ||
<td> | ||
<xsl:attribute name="class">center</xsl:attribute> | ||
<xsl:value-of select="@attempts"/>/<xsl:if test="@numberSolved < '1'">--</xsl:if> | ||
<xsl:if test="@bestSolutionTime"><xsl:value-of select="@bestSolutionTime"/></xsl:if>/<xsl:value-of select="@numberSolved"/> | ||
</td> | ||
</xsl:for-each> | ||
</xsl:template> | ||
|
||
<xsl:template name="problemTitle"> | ||
<xsl:for-each select="/contestStandings/standingsHeader/problem"> | ||
<th>    <strong><u><xsl:number format="A" value="@id"/></u></strong>    </th> | ||
</xsl:for-each> | ||
</xsl:template> | ||
<xsl:template name="problemColor"> | ||
<xsl:for-each select="/contestStandings/standingsHeader/colorList/colors[@siteNum = 1]/problem"> | ||
<td><center><xsl:choose><xsl:when test="@color"> <xsl:value-of select="@color"/></xsl:when><xsl:otherwise>Color<xsl:value-of select="@id"/></xsl:otherwise></xsl:choose></center></td> | ||
</xsl:for-each> | ||
</xsl:template> | ||
<xsl:template name="groupLink"> | ||
<xsl:param name="group"/> | ||
<xsl:for-each select="/contestStandings/standingsHeader/groupList/group[@id = $group]"> | ||
<a href="group_{$group}.html"><xsl:value-of select="@title"/> Per Site Standings | ||
</a> | ||
<br/> | ||
</xsl:for-each> | ||
</xsl:template> | ||
</xsl:stylesheet> |
Oops, something went wrong.