Men's Lacrosse Box Score (Final)
Niagara CCC at Alfred State
(4/16/2014 at 4 p.m. at Alfred, NY (Pioneer Stadium))

Niagara County Community College (0-10) at
Alfred St. (2-13)
Date: 4/16/2014, Attendance: 73
SCORE BY PERIOD 1 2 3 4 FINAL
 
Niagara County Community College 2 0 1 2 5
Alfred St. 3 5 3 3 14

Niagara County Community College SCORING: GOALS:
There was a problem with a Velocity script
Pagelcxml-monospace-template
ErrorInvocation of method 'substring' in class java.lang.String threw exception java.lang.StringIndexOutOfBoundsException: String index out of range: 1 at lcxml-monospace-template[line 358, column 11]
Page source:
1: ##COMMON FUNCTIONS
2: #macro (printPdfHeader $title)
3: <div class="stats-fullbox clearfix">
4:     <table>
5:         <tr>
6:             <td class="align-center"><h4>$title</h4></td>
7:         </tr>
8:     </table>
9: </div>
10: #end
11: ##
12: 
13: #if($stats.view != "pdf" )
14:     $website.decorate("printer-decorator")
15: #end
16: 
17: #set ($periodRule = $tool.math.toInteger($document.valueOf("lcgame/venue/rules/@prds")))
18: #if ($periodRule == 4)
19:     #set ($gender = 'M')
20: #else
21:     #set ($gender = 'F')
22: #end
23: 
24: #macro (period $p)
25:   #if ($p == 1) 1st
26:   #elseif ($p == 2) 2nd #end
27: 
28:   #if ($p == 3 && $gender == 'M') 3rd
29:   #elseif ($p == 3 && $gender == 'F') OT #end
30: 
31:   #if ($p == 4 && $gender == 'M') 4th
32:   #elseif ($p == 4 && $gender == 'F') 2OT #end
33: 
34:   #if ($p > 4 && $gender == 'M')
35: 	#set($ot = $p - 4)
36: 	#if ($ot > 1)
37: 		${ot}OT
38: 	#else
39: 		OT
40: 	#end
41:   #elseif ($p > 4 && $gender == 'F')
42:     #set ($ot = $p - 3)
43: 	${ot}th
44:   #end
45: #end
46: 
47: #set ($home = $document.valueOf("lcgame/team[@vh='H']/@name"))
48: #set ($visitor = $document.valueOf("lcgame/team[@vh='V']/@name"))
49: #set ($status = $tool.math.toInteger($document.valueOf("lcgame/status/@period")))
50: #set ($clock = $document.valueOf("lcgame/status/@clock"))
51: 
52: #set ($periods = $document.numberValueOf("lcgame/team[@vh='V']/linescore/@periods"))
53: #set ($periods = $tool.math.toInteger($periods))
54: #set ($periodRange = [1..$periods])
55: 
56: #set ($linkPlayers = $stats.linkPlayers)
57: #set ($linkPlayersBase = $stats.linkPlayersBase)
58: #set ($linkTeams = $stats.linkTeams)
59: #set ($linkTeamsBase = $stats.linkTeamsBase)
60: 
61: #set ($shootoutScores = {"V" : 0, "H" : 0})
62: #set ($hasPlayByPlay = $document.selectNodes("lcgame/plays/period").size() > 0)
63: #set ($isNeutralGame = $documnt.valueOf("lcgame/venue/@neutralgame"))
64: #if ($isNeutralGame.length() > 0 && $isNeutralGame.equals("Y"))
65:   #set ($isNeutralGame = true)
66: #else
67:   #set ($isNeutralGame = false)
68: #end
69: 
70: #if ($stats.pageUrl.length() > 0 && !$stats.pageUrl.contains("?"))
71: 	#set ($paramSep = "?")
72: #else
73: 	#set ($paramSep = "&")
74: #end
75: 
76: #set ($visname = $document.valueOf("lcgame/venue/@visname"))
77: #set ($homename = $document.valueOf("lcgame/venue/@homename"))
78: #set ($visid = $document.valueOf("lcgame/venue/@visid"))
79: #set ($homeid = $document.valueOf("lcgame/venue/@homeid"))
80: #set ($location = $document.valueOf("lcgame/venue/@location"))
81: #set ($stadium = $document.valueOf("lcgame/venue/@stadium"))
82: #set ($date = $document.valueOf("lcgame/venue/@date"))
83: #set ($time = $document.valueOf("lcgame/venue/@start"))
84: #set ($schedNote = $document.valueOf("lcgame/venue/@schednote"))
85: 
86: ## SORT GOALIES BY GOALIECHANGES NODE https://prestosports.jira.com/browse/PS-5828
87: #set ($visitorGoaliesOrder = [])
88: #set ($visitorCount = 1)
89: 
90: #set ($homeGoaliesOrder = [])
91: #set ($homeCount = 1)
92: 
93: #foreach ($node in $document.selectNodes("lcgame/goaliechanges/goaliechange"))
94: 	#if ($node.attributeValue('vh') == 'V')
95: 		#if ($!visitorGoaliesOrder.add($node.attributeValue('uni')))#end
96: 		#set($visitorCount = $visitorCount + 1)
97: 	#else
98: 		#if ($!homeGoaliesOrder.add($node.attributeValue('uni')))#end
99: 		#set($homeCount = $homeCount + 1)
100: 	#end
101: #end
102: 
103: #macro (printPlayerName $node $link)
104: 	#if ($node.valueOf("../@playerId").length() > 0 && $linkPlayers && $link)
105: 		<a href="$!linkPlayersBase?id=${stat.valueOf("../@playerId")}">
106: 	#end
107: 	$node.valueOf("../@name")
108: 	#if ($node.valueOf("../@playerId").length() > 0 && $linkPlayers && $link)
109: 		</a>
110: 	#end
111: #end
112: 
113: #macro (listGoalies $nodes $pos)
114: 	#foreach ($stat in $nodes)
115: 		#if ($pos == $stat.valueOf("../@uni") || ! $pos)
116: 			<div class="row goalies">
117: 				<div class="toggle clearfix">
118: 					<div class="data">$!stat.valueOf("../@uni")</div>
119: 					<div class="name">#printPlayerName($stat, false)</div>
120: 					#set ($ga = $stat.numberValueOf("@ga"))
121: 					<div class="data">$!formatter.formatNumber($ga, "#")</div>
122: 					<div class="data">$!stat.valueOf("@minutes")</div>
123: 					<div class="data">$!stat.valueOf("@saves")</div>
124: 					<div class="data">#shots($stat.valueOf("@ga") $stat.valueOf("@saves"))</div>
125: 				</div>
126: 			</div>
127: 		#end
128: 	#end
129: #end
130: 
131: #macro (printGoalies $team)
132: 	#set ($nodes = $team.selectNodes("player/goalie"))
133: 	#if ($team.attributeValue('vh') == 'V')
134: 		#set($order = $visitorGoaliesOrder)
135: 	#else
136: 		#set($order = $homeGoaliesOrder)
137: 	#end
138: 
139: 	#set ($printedUNIS = [])
140: 
141: 	#if ($order.size() > 0)
142: 		#foreach($uni in $order)
143: 
144: 			#set ($printAllowed = true)
145: 
146: 			#foreach($printedUNI in $printedUNIS)
147: 				#if ($uni == $printedUNI)
148: 					#set ($printAllowed = false)
149: 				#end
150: 			#end
151: 
152: 			#if ($printAllowed)
153: 				#listGoalies($nodes, $uni)
154: 				#set ($addResult = $printedUNIS.add($uni))
155: 			#end
156: 		#end
157: 	#else
158: 		#listGoalies($nodes, false)
159: 	#end
160: #end
161: 
162: ## GOALIE SHOTS
163: #macro (shots $ga $saves)
164: 	#if ($saves.length() > 0)
165: 		$tool.math.add($ga, $saves)
166: 	#else
167: 
168: 	#end
169: #end
170: 
171: ## POWER PLAY PERCENTAGE
172: #macro (pp $ppg $ppopp)
173: 	#if ($ppopp.length() > 0)
174: 		$formatter.formatNumber($tool.math.div($ppopp, $ppg), 3)
175: 	#else
176: 
177: 	#end
178: #end
179: 
180: ## SHOOTOUT
181: #macro (shootout $shootouts $t)
182: 	#foreach ($shot in $shootouts)
183: 		#if ($shot.valueOf("@vh") == $t)
184: 			#if ($shot.valueOf("@result") == "MADE")
185: 				#set ($score = $shootoutScores.get($t))
186: 				#set ($score = $tool.math.add($score, 1))
187: 				#set ($score = $shootoutScores.put($t, $score))
188: 				Goal
189: 			#else
190: 				No Goal
191: 			#end
192: 			- #${shot.valueOf("@uni")} ${shot.valueOf("@name")}<br />
193: 		#end ## if
194: 	#end ## foreach
195: #end
196: 
197: #macro (printPeriodHeadCoach)
198: #set ($ot = 0)
199: #foreach ($i in $periodRange)
200: #if (($gender == 'M' && $i > 4) || ($gender == 'F' && $i > 2))
201:   #set ($ot = $ot + 1)
202:   #if ($ot > 1)
203:   <th style="width:40px;" class="align-left">${ot}OT</th>
204:   #else
205:   <th style="width:40px;" class="align-left">OT</th>
206:   #end
207: #else
208:   <th style="width:40px;" class="align-left">$i</th>
209: #end
210: #end
211: #end
212: 
213: ## CALCULATE FACEOFF
214: #macro (calculateFaceoff $pVal $period $team)
215:    #if ($team.attributeValue("name") == $visitor)
216:       #set ($otherTeam = $document.selectSingleNode("lcgame/team[@vh='H']"))
217:    #else
218:       #set ($otherTeam = $document.selectSingleNode("lcgame/team[@vh='V']"))
219:    #end
220:    #set($add1 = $team.valueOf("linescore/lineprd[$period]/@fowon"))
221:    #set($add2 = $otherTeam.valueOf("linescore/lineprd[$period]/@fowon"))
222:    #if ($add1.length() > 0 && $add2.length() > 0)
223:    ${pVal}-$tool.math.add($add1, $add2)
224:    #end
225: #end
226: 
227: 
228: #macro (playerstatsCoach $team)
229: <table>
230:  <tr><td class="align-left"><h4>$team.valueOf("@name")</h4></td></tr>
231: </table>
232: <table>
233:  <tr>
234:   <th>POS</th>
235:   <th class="align-left">#</th>
236:   <th class="align-left">PLAYER</th>
237:   <th>G</th>
238:   <th>A</th>
239:   <th>Pts</th>
240:   <th>Sh</th>
241:   <th>SOG</th>
242:   <th>GB</th>
243:    #if ($gender == 'M')<th>Face</th>#elseif ($gender == 'F')<th>DC</th>#end
244:    #if ($gender == 'F')<th>FPS</th>#end
245:   <th>T/O</th>
246:   <th>CT</th>
247:   #if ($gender == 'M')<th>Pen-Min</th>#elseif ($gender == 'F')<th>Fouls</th>#end
248:  </tr>
249: 
250: #foreach ($stat in $team.selectNodes("player/shots"))
251:  #if ($velocityCount % 2 == 0)
252:   #set ($row = "even")
253:  #else
254:   #set ($row = "odd")
255:  #end
256: 
257:  <tr class="$row">
258:   <td class="align-left">$stat.valueOf("../@pos")</td>
259:   <td>$!stat.valueOf("../@uni")</td>
260:   <td class="nowrap">
261:   #if ($stat.valueOf("../@playerId").length() > 0 and $linkPlayers)
262:   <a href="$!linkPlayersBase?id=${stat.valueOf("../@playerId")}">
263:   #end
264:   $stat.valueOf("../@name")
265:   #if ($stat.valueOf("../@playerId").length() > 0 and $linkPlayers)
266:   </a>
267:   #end
268:   #if($stat.valueOf("../@gs").length() > 0)*#end
269:   </td>
270: 
271:   <td class="align-center">$!stat.valueOf("@g")</td>
272:   <td class="align-center">$!stat.valueOf("@a")</td>
273:   <td class="align-center">$tool.math.add($!stat.valueOf("@g"),$!stat.valueOf("@a"))</td> ## PTS
274:   <td class="align-center">$!stat.valueOf("@sh")</td>
275:   <td class="align-center">$!stat.valueOf("@sog")</td>
276:   <td class="align-center">$!stat.valueOf("../misc/@gb")</td>
277:   #if ($gender == 'M')
278:     <td class="align-center">$!stat.valueOf("../misc/@facewon")-$!tool.math.add($!stat.valueOf("../misc/@facewon"),$!stat.valueOf("../misc/@facelost"))</td> ## FACEOFFS
279:   #elseif ($gender == 'F')
280:     <td class="align-center">$!stat.valueOf("../misc/@dc")</td> ##  DRAW CONTROLS
281:   #end
282:    #if ($gender == 'F')<td class="align-center">$!stat.valueOf("../shots/@freepos")</td>#end ## FREE POSITION
283:   <td class="align-center">$!stat.valueOf("../misc/@turnover")</td>
284:   <td class="align-center">$!stat.valueOf("../misc/@ct")</td>
285:   #if ($gender == 'M')
286:   <td class="align-center">$!stat.valueOf("../penalty/@count")-$!stat.valueOf("../penalty/@seconds")</td> ## PEN MIN
287:   #elseif ($gender == 'F')
288:      <td class="align-center">$!stat.valueOf("../penalty/@foul")</td> ## FOULS
289:   #end
290:  </tr>
291: #end
292:  <tr class="totals">
293:   <td colspan="3">Totals</td>
294:   <td class="align-center">$team.valueOf("totals/shots/@g")</td>
295:   <td class="align-center">$team.valueOf("totals/shots/@a")</td>
296:   <td class="align-center">$tool.math.add($!team.valueOf("totals/shots/@g"),$!team.valueOf("totals/shots/@a"))</td> ## PTS
297:   <td class="align-center">$team.valueOf("totals/shots/@sh")</td>
298:   <td class="align-center">$team.valueOf("totals/shots/@sog")</td>
299:   <td class="align-center">$team.valueOf("totals/misc/@gb")</td>
300:   #if ($gender == 'M')
301:     <td class="align-center">$team.valueOf("totals/misc/@facewon")-$!tool.math.add($!team.valueOf("totals/misc/@facewon"),$!team.valueOf("totals/misc/@facelost"))</td> ## FACEOFFS
302:   #elseif ($gender == 'F')
303:     <td class="align-center">$!team.valueOf("totals/misc/@dc")</td> ##  DRAW CONTROLS
304:   #end
305:    #if ($gender == 'F')<td class="align-center">$!team.valueOf("totals/shots/@freepos")</td>#end ## FREE POSITION
306:   <td class="align-center">$team.valueOf("totals/misc/@turnover")</td>
307:   <td class="align-center">$team.valueOf("totals/misc/@ct")</td>
308:   #if ($gender == 'M')
309:     <td class="align-center">$!team.valueOf("totals/penalty/@count")-$!team.valueOf("totals/penalty/@seconds")</td> ## PEN MIN
310:   #elseif ($gender == 'F')
311:     <td class="align-center">$!team.valueOf("totals/penalty/@foul")</td> ## FOULS
312:   #end
313:  </tr>
314: </table>
315: 
316: #if ($team.selectNodes("player/goalie").size() >= 1)
317: <br />
318: <table>
319:  <tr>
320:      <th class="align-left">#</th>
321:      <th class="align-left">GOALIES</th>
322:      <th>Min</th>
323:      <th>GA</th>
324:      <th>W/L</th>
325:      <th>Saves</th>
326:  </tr>
327:     #foreach ($stat in $team.selectNodes("player/goalie"))
328:         #if ($stat.valueOf("@minutes") != "0:00")
329:             #if ($velocityCount % 2 == 0)
330:                 #set ($row = "even")
331:             #else
332:                 #set ($row = "odd")
333:             #end
334: 
335:             <tr class="$row">
336:                 <td>$!stat.valueOf("../@uni")</td>
337:                 <td class="nowrap">#printPlayerName($stat, false)</td>
338:                 #set ($ga = $stat.numberValueOf("@ga"))
339:                 <td class="align-center">$!stat.valueOf("@minutes")</td>
340:                 <td class="align-center">$!formatter.formatNumber($ga, "#")</td>
341:                 #set ($winLoss = " ")
342:                 #if ($stat.valueOf("@win").length() > 0)
343:                     #set ($winLoss = "W")
344:                 #elseif ($stat.valueOf("@loss").length() > 0)
345:                     #set ($winLoss = "L")
346:                 #end
347:                 <td class="align-center">$winLoss</td>
348:                 <td class="align-center">$!stat.valueOf("@saves")</td>
349:             </tr>
350:         #end
351:     #end
352: </table>
353: #end
354: 
355: #end ##macro
356: 
357: #macro (capitalize $name)
358:     $name.substring(0,1).toUpperCase()$name.substring(1).toLowerCase()
359: #end
360: 
361: ## CAPITALIZE NAMES
362: #macro (printScoringName $name)
363:     #set ($name = $name.toLowerCase())
364:     ##$name[0] <br />
365:     ##$name.get(0) <br />
366:     ##$name.get(1) <br />
367:     #set ($comaIndex = $name.indexOf(','))
368:     #set ($comaIndexNext = $comaIndex + 1)
369:     #if ($comaIndex > -1)
370:         <span>#capitalize($name.substring($comaIndexNext)) #capitalize($name.substring(0, $comaIndex))</span>##
371:     #else
372:         #capitalize($name)
373:     #end
374: #end
375: 
376: #macro (printScoring $team)
377: <div class="align-left">
378:     $team.valueOf("@name") SCORING: GOALS:
379:     #set ($playerShown = false)##
380:     #foreach ($stat in $team.selectNodes("player/shots[@g]"))##
381:     #if ($stat.numberValueOf("@g") > 0)##
382:     #if ($playerShown); #end##
383:     #set ($playerShown = true)##
384:     #printScoringName($stat.valueOf('../@checkname')) $stat.valueOf('@g')##
385:     #end##
386:     #end##
387:     .
388: 
389:     <br /> ASSISTS:
390:     #set ($playerShown = false)
391:     #foreach ($stat in $team.selectNodes("player/shots[@a]"))##
392:     #if ($stat.numberValueOf("@a") > 0)##
393:     #if ($playerShown); #end##
394:     #set ($playerShown = true)##
395:     #printScoringName($stat.valueOf('../@checkname')) $stat.valueOf('@a')##
396:     #end##
397:     #end##
398:     .
399: </div>
400: #end ##macro
401: 
402: <div class="monostats clearfix">
403: 
404: <hr />
405: ## GAME INFORMATION
406: <div class="align-left bold">
407: #if($gender == 'M')Men's #elseif($gender == 'F') Women's #end Lacrosse Box Score #if ($stats.final)(Final)#end <br />
408: #if ($page.title.length() > 0)$!page.title <br />#end
409: $visname #if($isNeutralGame)vs.#else at #end $homename <br />
410: (#if($date.length() > 0)$date #if($time.length() > 0)at $time#end#end #if($location.length() > 0)at $location #if($stadium.length() > 0)($stadium)#end#end)
411: </div>
412: <br />
413: 
414: ## SCORING
415: <div class="clearfix">
416: <div class="monostats-halfbox-left">
417: <table>
418: <tr><td valign="top">
419: 	#foreach ($team in $document.selectNodes("lcgame/team"))
420: 		#set ($teamRecord = $team.valueOf("@record"))
421: 		$team.attributeValue("name") #if($teamRecord.length() > 0)($teamRecord)#end
422: 		#if ($velocityCount == 1)
423: 			#if($isNeutralGame)vs.#else at #end <br />
424: 		#end
425: 	#end
426: 	#if($date.length() > 0)<br /> Date: $date, #end
427: 	Attendance: $document.valueOf("lcgame/venue/@attend")
428: </td>
429: </tr></table>
430: </div>
431: 
432: ## TEAM SCORES
433: <div class="monostats-halfbox-right">
434: <table>
435: <tr>
436: 	<th class="align-left" style="padding-right:10px;">SCORE BY PERIOD</th>
437: 	#printPeriodHeadCoach()
438: 	<th style="width:40px" class="align-left">#if($stats.final)FINAL#else#period($status)#if($clock.length() > 0) - $clock#end#end</th>
439: </tr>
440: #if ($stats.view != "pdf")
441:     <tr><td colspan="$tool.math.add($periods, 2)" class="hr">&#160;</td></tr>
442: #end
443: 
444: #foreach ($team in $document.selectNodes("lcgame/team"))
445: 	<tr>
446: 		<td>$team.attributeValue("name")</td>
447: 		#foreach ($i in $periodRange)
448: 			<td class="align-left">$team.valueOf("linescore/lineprd[$i]/@score")</td>
449: 		#end
450: 		<td class="align-left">$team.valueOf("linescore/@score")</td>
451: 	</tr>
452: #end
453: </table>
454: </div>
455: </div>
456: <br />
457: 
458: ## SCORING BY TEAM
459: #if($stats.view == "pdf")
460: <br /><br />
461: #end
462: #printScoring($document.selectSingleNode("lcgame/team[@vh='V']"))
463: <br />
464: #printScoring($document.selectSingleNode("lcgame/team[@vh='H']"))
465: <br />
466: 
467: ## TEAM STATS
468: ## SHOTS BY PERIOD
469: <div class="monostats-halfbox-left">
470: <table>
471: <tr>
472:   <th class="align-left" style="width:150px">SHOTS BY PERIOD</th>
473:   #printPeriodHeadCoach()
474:   <th style="width:50px" class="align-left">TOTAL</th>
475:  </tr>
476: 
477:     #if ($stats.view != "pdf")
478:         <tr><td colspan="$tool.math.add($periods, 2)" class="hr">&#160;</td></tr>
479:     #end
480: 
481: ## TEAM SHOTS
482: #foreach ($team in $document.selectNodes("lcgame/team"))
483:  <tr>
484:   <td class="nowrap">$team.attributeValue("name")</td>
485: #foreach ($i in $periodRange)
486:   <td class="align-left">$team.valueOf("linescore/lineprd[$i]/@shots")</td>
487: #end
488:   <td class="align-left">$team.valueOf("linescore/@shots")</td>
489:  </tr>
490: #end
491: </table>
492: </div>
493: <div class="clear"></div>
494: <br />
495: 
496: ## GROUND BALLS
497: <div class="monostats-halfbox-left">
498: <table>
499:  <tr>
500:   <th class="align-left" style="width:150px">GROUND BALLS BY PRD</th>
501:   #printPeriodHeadCoach()
502:   <th style="width:50px" class="align-left">TOTAL</th>
503:  </tr>
504: 
505:     #if ($stats.view != "pdf")
506:         <tr><td colspan="$tool.math.add($periods, 2)" class="hr">&#160;</td></tr>
507:     #end
508: 
509: #foreach ($team in $document.selectNodes("lcgame/team"))
510:  <tr>
511:   <td class="nowrap">$team.attributeValue("name")</td>
512: #foreach ($i in $periodRange)
513:   <td class="align-left">$team.valueOf("linescore/lineprd[$i]/@gb")</td>
514: #end
515:   <td class="align-left">$team.valueOf("totals/misc/@gb")</td>
516:  </tr>
517: #end
518: </table>
519: </div>
520: <div class="clear"></div>
521: <br />
522: 
523: #if ($gender == 'M')
524: ## FACE OFFS
525: <div class="monostats-halfbox-left">
526: <table>
527:  <tr>
528:   <th class="align-left" style="width:150px">FACE-OFFS BY PRD</th>
529:   #printPeriodHeadCoach()
530:   <th style="width:50px" class="align-left">TOTAL</th>
531:  </tr>
532: 
533:     #if ($stats.view != "pdf")
534:         <tr><td colspan="$tool.math.add($periods, 2)" class="hr">&#160;</td></tr>
535:     #end
536: 
537: #foreach ($team in $document.selectNodes("lcgame/team"))
538:  <tr>
539:   <td class="nowrap">$team.attributeValue("name")</td>
540: #foreach ($i in $periodRange)
541:   #set ($tfo = $team.valueOf("linescore/lineprd[$i]/@fowon"))
542:   <td class="align-left">#calculateFaceoff($tfo $i $team)</td>
543: #end
544:   <td class="align-left">$team.valueOf("totals/misc/@facewon")-$tool.math.add($team.valueOf("totals/misc/@facewon"),$team.valueOf("totals/misc/@facelost"))</td>
545:  </tr>
546: #end
547: </table>
548: </div>
549: <div class="clear"></div>
550: <br />
551: #elseif ($gender == 'F')
552: <div class="monostats-halfbox-left">
553: <table>
554:  <tr>
555:   <th class="align-left" style="width:150px">DRAW CONTROLS BY PRD</th>
556:   #printPeriodHeadCoach()
557:   <th style="width:50px" class="align-left">TOTAL</th>
558:  </tr>
559:     #if ($stats.view != "pdf")
560:         <tr><td colspan="$tool.math.add($periods, 2)" class="hr">&#160;</td></tr>
561:     #end
562: #foreach ($team in $document.selectNodes("lcgame/team"))
563:  <tr>
564:   <td class="nowrap">$team.attributeValue("name")</td>
565: #foreach ($i in $periodRange)
566:   <td class="align-left">$team.valueOf("linescore/lineprd[$i]/@dc")</td>
567: #end
568:   <td class="align-left">$team.valueOf("totals/misc/@dc")</td>
569:  </tr>
570: #end
571: </table>
572: </div>
573: <div class="clear"></div>
574: <br />
575: 
576: #end
577: 
578: ## CLEARS
579: <div class="monostats-halfbox-left">
580: <table>
581:  <tr>
582:   <th class="align-left" style="width:150px">CLEARS</th>
583:   #printPeriodHeadCoach()
584:   <th class="align-left" style="width:50px">TOTAL</th>
585:  </tr>
586: 
587:     #if ($stats.view != "pdf")
588:         <tr><td colspan="$tool.math.add($periods, 2)" class="hr">&#160;</td></tr>
589:     #end
590: 
591: #foreach ($team in $document.selectNodes("lcgame/team"))
592:  <tr>
593:   <td class="nowrap">$team.attributeValue("name")</td>
594: #foreach ($i in $periodRange)
595:   <td class="align-left">$team.valueOf("linescore/lineprd[$i]/@clearm")-$team.valueOf("linescore/lineprd[$i]/@cleara")</td>
596: #end
597:   <td class="align-left">$team.valueOf("totals/clear/@clearm")-$team.valueOf("totals/clear/@cleara")</td>
598:  </tr>
599: #end
600: </table>
601: </div>
602: <div class="clear"></div>
603: <br />
604: 
605: #if ($gender == 'M')
606: ## MAN ADVANTAGE
607: <div class="monostats-halfbox-left">
608: <table>
609:  <tr>
610:   <th class="align-left" style="width:150px">EXTRA-MAN OPPS</th>
611:   #printPeriodHeadCoach()
612:   <th>TOTAL</th>
613:  </tr>
614: 
615:     #if ($stats.view != "pdf")
616:         <tr><td colspan="$tool.math.add($periods, 2)" class="hr">&#160;</td></tr>
617:     #end
618: #foreach ($team in $document.selectNodes("lcgame/team"))
619:  <tr>
620:   <td class="nowrap">$team.attributeValue("name")</td>
621: #foreach ($i in $periodRange)
622:   <td class="align-left">$team.valueOf("linescore/lineprd[$i]/@ppg")-$team.valueOf("linescore/lineprd[$i]/@ppatt")</td>
623: #end
624:   <td class="align-left">$team.valueOf("totals/powerplay/@ppg")-$team.valueOf("totals/powerplay/@ppopp")</td>
625:  </tr>
626: #end
627: </table>
628: </div>
629: <div class="clear"></div>
630: <br />
631: 
632: #elseif ($gender == 'F')
633: ## FREE POSITION SHOTS
634: <div class="monostats-halfbox-left">
635: <table>
636:  <tr>
637:   <th class="align-left" style="width:150px">FREE-POSITION SHOTS</th>
638:   #printPeriodHeadCoach()
639:   <th class="align-left" style="width:50px">TOTAL</th>
640:  </tr>
641: #if ($stats.view != "pdf")
642:     <tr><td colspan="$tool.math.add($periods, 2)" class="hr">&#160;</td></tr>
643: #end
644: #foreach ($team in $document.selectNodes("lcgame/team"))
645:  <tr>
646:   <td class="nowrap">$team.attributeValue("name")</td>
647: #foreach ($i in $periodRange)
648:   <td class="align-left">$team.valueOf("linescore/lineprd[$i]/@fpg")-$team.valueOf("linescore/lineprd[$i]/@fps")</td>
649: #end
650:   <td class="align-left">$team.valueOf("totals/goaltype/@freepos")-$team.valueOf("totals/shots/@freepos")</td>
651:  </tr>
652: #end
653: </table>
654: </div>
655: <div class="clear"></div>
656: <br />
657: #end
658: 
659: ## SAVES
660: <div class="monostats-halfbox-left">
661: <table>
662:  <tr>
663:   <th class="align-left" style="width:150px">SAVES BY PERIOD</th>
664:   #printPeriodHeadCoach()
665:   <th style="width:50px" class="align-left">TOTAL</th>
666:  </tr>
667: #if ($stats.view != "pdf")
668:     <tr><td colspan="$tool.math.add($periods, 2)" class="hr">&#160;</td></tr>
669: #end
670: #foreach ($team in $document.selectNodes("lcgame/team"))
671:  <tr>
672:   <td class="nowrap">$team.attributeValue("name")</td>
673: #foreach ($i in $periodRange)
674:   <td class="align-left">$team.valueOf("linescore/lineprd[$i]/@saves")</td>
675: #end
676:   <td class="align-left">$team.valueOf("totals/goalie/@saves")</td>
677:  </tr>
678: #end
679: </table>
680: </div>
681: <div class="clear"></div>
682: <br />
683: 
684: 
685: #if ($gender == 'F')
686: ## FOULS
687: <div class="monostats-halfbox-left">
688: <table>
689:  <tr>
690:   <th class="align-left" style="width:150px">FOULS BY PRD</th>
691:   #printPeriodHeadCoach()
692:   <th style="width:50px" class="align-left">TOTAL</th>
693:  </tr>
694: #if ($stats.view != "pdf")
695:     <tr><td colspan="$tool.math.add($periods, 2)" class="hr">&#160;</td></tr>
696: #end
697: #foreach ($team in $document.selectNodes("lcgame/team"))
698: <tr>
699:   <td class="nowrap">$team.attributeValue("name")</td>
700: #set ($foulTotal = 0)
701: #foreach ($i in $periodRange)
702:   #set ($foulVal = $team.valueOf("linescore/lineprd[$i]/@fouls"))
703:   #if ($foulVal.length() > 0)
704:     #set ($foulTotal = $tool.math.add($foulTotal, $foulVal))
705: 	<td class="align-left">$foulVal</td>
706:   #else
707:     <td>&#160;</td>
708:   #end
709: #end
710:   <td class="align-left">$foulTotal</td>
711: </tr>
712: #end
713: </table>
714: </div>
715: <div class="clear"></div>
716: <br />
717: #end
718: 
719: 
720: 
721: ## TURNOVERS
722: <div class="monostats-halfbox-left">
723: <table>
724:  <tr>
725:   <th class="align-left" style="width:150px">TURNOVERS BY PRD</th>
726:   #printPeriodHeadCoach()
727:   <th style="width:50px" class="align-left">TOTAL</th>
728:  </tr>
729: #if ($stats.view != "pdf")
730:     <tr><td colspan="$tool.math.add($periods, 2)" class="hr">&#160;</td></tr>
731: #end
732: #foreach ($team in $document.selectNodes("lcgame/team"))
733:  <tr>
734:   <td class="nowrap">$team.attributeValue("name")</td>
735: #foreach ($i in $periodRange)
736:   <td class="align-left">$team.valueOf("linescore/lineprd[$i]/@turnover")</td>
737: #end
738:   <td class="align-left">$team.valueOf("totals/misc/@turnover")</td>
739:  </tr>
740: #end
741: </table>
742: </div>
743: <div class="clear"></div>
744: <br />
745: 
746: #if($stats.view == "pdf")
747:     </div>
748:     <p class="pagebreak">&nbsp;</p>
749:     #printPdfHeader("Visitor Individual Statistics")
750:     <div class="monostats clearfix">
751: #else
752:     <span class="pagebreak"></span>
753: #end
754: 
755: ## VISITOR STATISTICS
756: <div class="monostats-fullbox">#playerstatsCoach($document.selectSingleNode("lcgame/team[@vh='V']"))</div>
757: <br />
758: #if($stats.view == "pdf")
759:     </div>
760:     <p class="pagebreak">&nbsp;</p>
761:     #printPdfHeader("Home Individual Statistics")
762:     <div class="monostats clearfix">
763: #end
764: ## HOME STATISTICS
765: <div class="monostats-fullbox">#playerstatsCoach($document.selectSingleNode("lcgame/team[@vh='H']"))</div>
766: 
767: #if($stats.view == "pdf")
768:     </div>
769:     <p class="pagebreak">&nbsp;</p>
770:     #printPdfHeader("Scoring/Penalty Summary")
771:     <div class="monostats clearfix">
772: #else
773:     <span class="pagebreak"></span>
774: #end
775: 
776: ## SCORING SUMMARY
777: <div class="monostats-fullbox clearfix">
778: <table style="width:100%">
779:  <tr><th #if($hasPlayByPlay)colspan="8"#else colspan="7"
780:           #end class="align-left">SCORING
781:      SUMMARY</th></tr>
782:  <tr>
783: 	<th>&#160;</th>
784: 	<th class="align-left">Prd</th>
785: 	<th class="align-left">Time</th>
786: 	<th class="align-left">Team</th>
787: 	<th class="align-left">Type</th>
788: 	<th class="align-left" style="width:30%">Goal Scorer</th>
789: 	<th class="align-left" style="width:30%">Assists</th>
790: 	#if ($hasPlayByPlay)
791: 		<th class="align-left">H-V</th>
792: 	#end
793: </tr>
794: 
795: ## #foreach ($pd in $periodRange)
796: ## #set ($shownStats = "")
797: 
798: ## <th class="align-center">-- <span class="bold">#period($pd)</span> -- </th>
799: ## #if ($hasPlayByPlay)
800: ## <td class="align-center"><span class="bold">$visitor</span></td>
801: ## <td class="align-center"><span class="bold">$home</span></td>
802: ## #end
803: 
804: #set ($currentPeriod = '')
805: #set ($currentscoreNodes = $document.selectNodes("//currentscore"))
806: #foreach ($score in $document.selectNodes("lcgame/scores/score"))
807: 	#set ($pd = $score.valueOf("@prd"))
808: 	#set ($shownStats = "y")
809: 	#set ($type = $score.valueOf("@type"))
810: 
811: 	<tr>
812: 	<td>$velocityCount.</td>
813: 	<td>#if ($currentPeriod != $pd) #period($pd) #set ($currentPeriod = $pd) #else &#160; #end</td>
814: 	<td>$score.valueOf("@time")</td>
815: 	<td>
816: 		#if($score.valueOf("@vh") == 'H') $homeid #end
817: 		#if($score.valueOf("@vh") == 'V') $visid #end
818: 	</td>
819: 
820: 	## TYPE
821: 	<td>
822:         #if ($type == 'PP')
823:             UP
824:         #elseif ($type == 'SH')
825:             DN
826:         #else
827:             $!type
828:         #end
829: 	</td>
830: 	<td>
831: 		#if ($score.valueOf("@playerId").length() > 0 and $linkPlayers)
832: 			<a href="$!linkPlayersBase?id=${score.valueOf("@playerId")}">
833: 		#end
834: 		$score.valueOf("@name")
835: 		#if ($score.valueOf("@playerId").length() > 0 and $linkPlayers)
836: 			</a>
837: 		#end
838: 	</td>
839: 	<td>
840: 		#if($score.valueOf("@assist1").length() > 0)
841: 			#if ($score.valueOf("@assist1Id").length() > 0 and $linkPlayers)
842: 				<a href="$!linkPlayersBase?id=${score.valueOf("@assist1Id")}">
843: 			#end
844: 			$score.valueOf("@assist1")
845: 			#if ($score.valueOf("@assist1Id").length() > 0 and $linkPlayers)
846: 				</a>
847: 			#end
848: 		#else
849: 			#if ($hasPlayByPlay && $gender == 'F')
850: 				#set ($scoreTime = $score.valueOf("@time"))
851: 				#set ($fpsFlag = false)
852: 
853: 				#foreach ($fpsNode in $document.selectNodes("//play[@action='FPS']"))
854: 					#if ($fpsNode.valueOf("@clock") == $scoreTime)
855: 						#set ($fpsFlag = true)
856: 					#end
857: 				#end
858: 
859: 				#if ($fpsFlag)
860: 					Free position shot
861: 				#else
862: 					unassisted
863: 				#end
864: 			#else
865: 				unassisted
866: 			#end
867: 		#end
868: 		#if($score.valueOf("@assist2").length() > 0)
869: 			&amp;
870: 			#if ($score.valueOf("@assist2Id").length() > 0 and $linkPlayers)
871: 				<a href="$!linkPlayersBase?id=${score.valueOf("@assist2Id")}">
872: 			#end
873: 			$score.valueOf("@assist2")
874: 			#if ($score.valueOf("@assist2Id").length() > 0 and $linkPlayers)
875: 				</a>
876: 			#end
877: 		#end
878: 	</td>
879: 	#if ($hasPlayByPlay && $currentscoreNodes.size() >($tool.math.sub($velocityCount, 1)))
880: 		#set ($currentScore = $currentscoreNodes.get($tool.math.sub($velocityCount, 1)))
881: 		<td>$currentScore.valueOf("@hscore")-$currentScore.valueOf("@vscore")</td>
882: 	#end
883: 	</tr>
884: #end ## scoring foreach
885: 
886: #if ($shownStats == "") <tr><td #if($hasPlayByPlay)colspan="8"#else colspan="7"#end class="align-center">(no scoring)</td></tr> #end
887: 
888: ## #end ## period range
889: </table>
890: </div>
891: 
892: 
893: ## PENALTY SUMMARY
894: <div class="monostats-fullbox clearfix">
895: <table style="width:100%">
896: 	<tr><th colspan="6" class="align-left">PENALTY SUMMARY</th></tr>
897: 	###foreach ($pd in $periodRange)
898: 	## #set ($shownStats = "")
899: 	## <tr class="stats-highlight"><td colspan="4" class="align-center">-- <span class="bold">#period($pd)</span> -- </td></tr>
900: 
901: 	<tr>
902: 		<th class="align-left">Prd</th>
903: 		<th class="align-left">Time</th>
904: 		<th class="align-left">Team</th>
905: 		<th class="align-left" style="width:30%">#-Player</th>
906: 		<th class="align-left">Min</th>
907: 		<th class="align-left" style="width:30%">Offence</th>
908: 	</tr>
909: 
910: #foreach ($penalty in $document.selectNodes("lcgame/penalties/pen"))
911: 	#set ($shownStats = "y")
912: 	<tr>
913: 	<td>#period($penalty.valueOf("@prd"))</td>
914: 	<td>$penalty.valueOf("@time")</td>
915: 	<td>
916: 		#if($penalty.valueOf("@vh") == 'H') $homeid #end
917: 		#if($penalty.valueOf("@vh") == 'V') $visid #end
918: 	</td>
919: 	<td>
920: 		##$penalty.valueOf("@../uni")-
921: 		$penalty.valueOf("@name")
922: 	</td>
923: 	<td>
924: 		$!penalty.valueOf("@minutes") $!penalty.valueOf("@type")
925: 		## #if ($penalty.valueOf("@type") == 'PP')PP#end
926: 		## #if ($penalty.valueOf("@type") == 'SH')SH#end
927: 	</td>
928: 	<td>
929: 		$!penalty.valueOf("@desc")
930: 	</td></tr>
931: #end ## penalty foreach
932: 
933: #if ($shownStats == "")
934: <tr><td colspan="6" class="align-center">(no penalties)</td></tr>
935: #end
936: 
937: #if ($gender == 'M')
938: ## penalty minutes
939: ## MEN ONLY
940:  <tr><th colspan="6" class="align-left"><br /> PENALTY TOTALS</th></tr>
941:  <tr>
942:   <td colspan="6">
943: 
944:    <table>
945:     <tr>
946:      #foreach ($team in $document.selectNodes("lcgame/team"))
947: 	  #set ($penaltySeconds = $team.valueOf("totals/penalty/@seconds"))
948: 	  #set ($penaltyCount = $team.valueOf("totals/penalty/@count"))
949: 	  #if ($penaltySeconds.length() > 0 && $penaltyCount.length() > 0)
950: 	    #set ($penaltySeconds = $tool.math.toInteger($penaltySeconds))
951: 		#set ($remainder = 0)
952: 	    #set ($remainder = $penaltySeconds % 60)
953: 	    #set ($penaltyMinutes = $tool.math.toInteger($tool.math.div($penaltySeconds, 60)))
954: 	    #if ($penaltyMinutes > 1)
955: 	      #set ($minString = "${penaltyMinutes} minutes")
956: 	    #else
957: 	      #set ($minString = "${penaltyMinutes} minute")
958:         #end
959: 		#set ($secString = "")
960: 		#if ($remainder > 0)
961: 		  #if ($remainder > 1)
962: 		    #set ($secString = "${remainder} seconds")
963: 		  #else
964: 		    #set ($secString = "${remainder} second")
965: 		  #end
966: 		#end
967:         <td><span class="bold">$team.attributeValue("name")</span>:  $minString $secString on $penaltyCount infraction(s)</td>
968: 	  #else
969: 	    <td>&#160;</td>
970: 	  #end
971:      #end
972:     </tr>
973:    </table>
974: 
975:   </td>
976:  </tr>
977: #end
978: </table>
979: </div>
980: </div>
981: 
982: #if($stats.view != "pdf" )
983:     $wiki.su
984: #end