To begin, I'm using Adobe's Spry Framework for all my data in my XML
page, it saves space and code on the HTML. Well, I want to make it so
that certain cells are chosen and are either highlighted with green or
red depending on a condition.
=============== =============== ======XML====== =============== =============== ==
<?xml version="1.0" encoding="iso-8859-1"?>
<?xml-stylesheet type="text/xsl" href="bowlgames .xsl"?>
<bowlgames>
<game id="1">
<name>Poinset ta Bowl</name>
<date>12/19/06 8:00 PM</date>
<channel>ESPN 2</channel>
<team1>TCU</team1>
<team2>Northe rn Illinois</team2>
<score>37-7</score>
<winner>TCU</winner>
<steve>TCU</steve>
<brandon>TCU</brandon>
</game>
<game id="2">
<name>Las Vegas Bowl</name>
<date>12/21/06 8:00 PM</date>
<channel>ESPN HD</channel>
<team1>BYU</team1>
<team2>Oregon </team2>
<score>N/A</score>
<winner>N/A</winner>
<steve>BYU</steve>
<brandon</brandon>
</game>
<game id="3">
<name>New Orleans Bowl</name>
<date>12/22/06 8:00 PM</date>
<channel>ESPN 2 HD</channel>
<team1>Rice</team1>
<team2>Troy</team2>
<score>N/A</score>
<winner>N/A</winner>
<steve>Rice</steve>
<brandon</brandon>
</game>
<game id="4">
<name>Papajohns .com Bowl</name>
<date>12/23/06 1:00 PM</date>
<channel>ESPN 2 HD</channel>
<team1>South Florida</team1>
<team2>East Carolina</team2>
<score>N/A</score>
<winner>N/A</winner>
<steve>East Carolina</steve>
<brandon</brandon>
</game>
<game id="5">
<name>New Mexico Bowl</name>
<date>12/23/06 4:30 PM</date>
<channel>ESPN HD</channel>
<team1>New Mexico</team1>
<team2>San Jose State</team2>
<score>N/A</score>
<winner>N/A</winner>
<steve>San Jose State</steve>
<brandon</brandon>
</game>
<game id="6">
<name>Bell Helicopter Armed Forces Bowl</name>
<date>12/23/06 8:00 PM</date>
<channel>ESPN HD</channel>
<team1>Tulsa</team1>
<team2>Utah</team2>
<score>N/A</score>
<winner>N/A</winner>
<steve>Tulsa</steve>
<brandon</brandon>
</game>
<game id="7">
<name>Hawaii Bowl</name>
<date>12/24/06 8:00 PM</date>
<channel>ESPN HD</channel>
<team1>Arizon a State</team1>
<team2>Hawaii </team2>
<score>N/A</score>
<winner>N/A</winner>
<steve>Arizon a State</steve>
<brandon</brandon>
</game>
<game id="8">
<name>Motor City Bowl</name>
<date>12/26/06 7:30 PM</date>
<channel>ESPN HD</channel>
<team1>Middle Tennessee</team1>
<team2>Centra l Michigan</team2>
<score>N/A</score>
<winner>N/A</winner>
<steve>Centra l Michigan</steve>
<brandon</brandon>
</game>
<game id="9">
<name>Emerald Bowl</name>
<date>12/27/06 8:00 PM</date>
<channel>ESPN HD</channel>
<team1>Florid a State</team1>
<team2>UCLA</team2>
<score>N/A</score>
<winner>N/A</winner>
<steve>UCLA?</steve>
<brandon</brandon>
</game>
<game id="10">
<name>Independe nce Bowl</name>
<date>12/28/06 4:30 PM</date>
<channel>ESPN HD</channel>
<team1>Oklaho ma State</team1>
<team2>Alabam a</team2>
<score>N/A</score>
<winner>N/A</winner>
<steve>Oklaho ma State</steve>
<brandon</brandon>
</game>
<game id="11">
<name>Holiday Bowl</name>
<date>12/28/06 8:00 PM</date>
<channel>ESPN HD</channel>
<team1>Californ ia</team1>
<team2>Texas A&M</team2>
<score>N/A</score>
<winner>N/A</winner>
<steve>Californ ia</steve>
<brandon</brandon>
</game>
<game id="12">
<name>Texas Bowl</name>
<date>12/28/06 8:00 PM</date>
<channel>NFL Network</channel>
<team1>Rutger s</team1>
<team2>Kansas State</team2>
<score>N/A</score>
<winner>N/A</winner>
<steve>Rutger s</steve>
<brandon</brandon>
</game>
<game id="13">
<name>Music CityBowl</name>
<date>12/29/06 1:00 PM</date>
<channel>ESPN HD</channel>
<team1>Clemso n</team1>
<team2>Kentucky </team2>
<score>N/A</score>
<winner>N/A</winner>
<steve>Clemso n</steve>
<brandon</brandon>
</game>
<game id="14">
<name>Brut Sun Bowl</name>
<date>12/29/06 2:00 PM</date>
<channel>CBS</channel>
<team1>Oregon State</team1>
<team2>Missouri </team2>
<score>N/A</score>
<winner>N/A</winner>
<steve>Missouri ?</steve>
<brandon</brandon>
</game>
<game id="15">
<name>Liberty Bowl</name>
<date>12/29/06 4:30 PM</date>
<channel>ESPN HD</channel>
<team1>Housto n</team1>
<team2>South Carolina</team2>
<score>N/A</score>
<winner>N/A</winner>
<steve>South Carolina</steve>
<brandon</brandon>
</game>
<game id="16">
<name>Insight Bowl</name>
<date>12/29/06 7:30 PM</date>
<channel>NFL Network</channel>
<team1>Texas Tech</team1>
<team2>Minnesot a</team2>
<score>N/A</score>
<winner>N/A</winner>
<steve>Minnesot a</steve>
<brandon</brandon>
</game>
<game id="17">
<name>Champs Sports Bowl</name>
<date>12/29/06 8:00 PM</date>
<channel>ESPN HD</channel>
<team1>Purdue </team1>
<team2>Maryland </team2>
<score>N/A</score>
<winner>N/A</winner>
<steve>Purdue </steve>
<brandon</brandon>
</game>
<game id="18">
<name>Meineke Car Care Bowl</name>
<date>12/30/06 1:00 PM</date>
<channel>ESPN HD</channel>
<team1>Navy</team1>
<team2>Boston College</team2>
<score>N/A</score>
<winner>N/A</winner>
<steve>Navy</steve>
<brandon</brandon>
</game>
<game id="19">
<name>Alamo Bowl</name>
<date>12/30/06 4:30 PM</date>
<channel>ESPN HD</channel>
<team1>Texas</team1>
<team2>Iowa</team2>
<score>N/A</score>
<winner>N/A</winner>
<steve>Texas</steve>
<brandon</brandon>
</game>
<game id="20">
<name>Chick-fil-A Bowl</name>
<date>12/30/06 8:00 PM</date>
<channel>ESPN HD</channel>
<team1>Georgi a</team1>
<team2>Virgin ia Tech</team2>
<score>N/A</score>
<winner>N/A</winner>
<steve>Virgin ia Tech</steve>
<brandon</brandon>
</game>
<game id="21">
<name>MPC Computers Bowl</name>
<date>12/31/06 7:30 PM</date>
<channel>ESPN HD</channel>
<team1>Miami</team1>
<team2>Nevada </team2>
<score>N/A</score>
<winner>N/A</winner>
<steve>Miami? </steve>
<brandon</brandon>
</game>
<game id="22">
<name>Outback Bowl</name>
<date>1/1/07 11:00 AM</date>
<channel>ESPN HD</channel>
<team1>Tennesse e</team1>
<team2>Penn State</team2>
<score>N/A</score>
<winner>N/A</winner>
<steve>Tennesse e</steve>
<brandon</brandon>
</game>
<game id="23">
<name>Cotton Bowl</name>
<date>1/1/07 11:30 AM</date>
<channel>FOX</channel>
<team1>Auburn </team1>
<team2>Nebraska </team2>
<score>N/A</score>
<winner>N/A</winner>
<steve>Nebraska ?</steve>
<brandon</brandon>
</game>
<game id="24">
<name>Gator Bowl</name>
<date>1/1/07 1:00 PM</date>
<channel>CBS</channel>
<team1>West Virginia</team1>
<team2>Georgi a Tech</team2>
<score>N/A</score>
<winner>N/A</winner>
<steve>West Virginia</steve>
<brandon</brandon>
</game>
<game id="25">
<name>Capital One Bowl</name>
<date>1/1/07 1:00 PM</date>
<channel>ABC HD</channel>
<team1>Arkansas </team1>
<team2>Wisconsi n</team2>
<score>N/A</score>
<winner>N/A</winner>
<steve>Wisconsi n</steve>
<brandon</brandon>
</game>
<game id="26">
<name>Rose Bowl</name>
<date>1/1/07 5:00 PM</date>
<channel>ABC HD</channel>
<team1>USC</team1>
<team2>Michigan </team2>
<score>N/A</score>
<winner>N/A</winner>
<steve>Michigan </steve>
<brandon</brandon>
</game>
<game id="27">
<name>Fiesta Bowl</name>
<date>1/1/07 8:00 PM</date>
<channel>FOX</channel>
<team1>Boise State</team1>
<team2>Oklahoma </team2>
<score>N/A</score>
<winner>N/A</winner>
<steve>Oklahoma </steve>
<brandon</brandon>
</game>
<game id="28">
<name>Orange Bowl</name>
<date>1/2/07 8:00 PM</date>
<channel>FOX</channel>
<team1>Louisvil le</team1>
<team2>Wake Forest</team2>
<score>N/A</score>
<winner>N/A</winner>
<steve>Louisvil le</steve>
<brandon</brandon>
</game>
<game id="29">
<name>Sugar Bowl</name>
<date>1/3/07 8:00 PM</date>
<channel>FOX</channel>
<team1>Notre Dame</team1>
<team2>LSU</team2>
<score>N/A</score>
<winner>N/A</winner>
<steve>LSU</steve>
<brandon</brandon>
</game>
<game id="30">
<name>Internati onal Bowl</name>
<date>1/6/07 8:00 PM</date>
<channel>ESPN 2 HD</channel>
<team1>Cincinna ti</team1>
<team2>Wester n Michigan</team2>
<score>N/A</score>
<winner>N/A</winner>
<steve>Cincinna ti</steve>
<brandon</brandon>
</game>
<game id="31">
<name>GMAC Bowl</name>
<date>1/7/07 8:00 PM</date>
<channel>ESPN HD</channel>
<team1>Ohio</team1>
<team2>Southe rn Miss</team2>
<score>N/A</score>
<winner>N/A</winner>
<steve>Southe rn Miss</steve>
<brandon</brandon>
</game>
<game id="32">
<name>BCS Championship Game</name>
<date>1/8/07 8:00 PM</date>
<channel>FOX</channel>
<team1>Florid a</team1>
<team2>Ohio State</team2>
<score>N/A</score>
<winner>N/A</winner>
<steve>Ohio State</steve>
<brandon</brandon>
</game>
</bowlgames>
=============== =============== ==========XSL== =============== =============== ===
<?xml version="1.0" encoding="ISO-8859-1"?><!--
DWXMLSource="bo wlgames.xml" -->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dt d">
<xsl:styleshe et version="1.0"
xmlns:xsl="http ://www.w3.org/1999/XSL/Transform"
xmlns:spry="htt p://ns.adobe.com/spry/">
<xsl:template match="/">
<xsl:for-each select="bowlgam es/game">
<div align="left" class="ContentM ain" style="position :absolute;
left:144px; top:398px; z-index:3; width: 697px;"
spry:region="ds BowlGame" >
<table width="100%" border="1" cellpadding="1" cellspacing="0"
bordercolor="#0 00000" align="center">
<tr>
<th width="3%" onclick="dsBowl Game.sort('@id' );">#</th>
<th onclick="dsBowl Game.sort('stev e');">Steve's Pick</th>
<th onclick="dsBowl Game.sort('bran don');">Brandon 's Pick</th>
</tr>
<tr spry:repeat="ds BowlGame">
<td align="center"> {@id}</td>
<xsl:choose>
<xsl:when test="bowlgames/game/steve = bowlgames/game/winner">
<td align="center"> <span
style="color:#0 0FF00">{steve}</span></td>
</xsl:when>
<xsl:otherwis e>
<td align="center"> <span
style="color:#F F0000">{steve}</span></td>
</xsl:otherwise>
</xsl:choose>
<xsl:choose>
<xsl:when test="bowlgames/game/brandon =
bowlgames/game/winner">
<td align="center"> <span
style="color:#0 0FF00">{brandon }</span></td>
</xsl:when>
<xsl:otherwis e>
<td align="center"> <span
style="color:#F F0000">{brandon }</span></td>
</xsl:otherwise>
</xsl:choose>
</tr>
</table>
</div>
</xsl:for-each>
</xsl:template>
</xsl:stylesheet>
=============== =============== =====HTML====== =============== =============== =
This is only a code snippet of the whole HTML file, because the XML
doesn't affect anyone else.
<div align="left" class="ContentM ain" style="position :absolute;
left:144px; top:398px; z-index:3; width: 697px;"
spry:region="ds BowlGame" >
<table width="100%" border="1" cellpadding="1" cellspacing="0"
bordercolor="#0 00000" align="center">
<tr>
<th width="3%" onclick="dsBowl Game.sort('@id' );">#</th>
<th width="25%" onclick="dsBowl Game.sort('name ');">Bowl Name</th>
<th width="15%" onclick="dsBowl Game.sort('date ');">Date &
Time</th>
<th width="10%"
onclick="dsBowl Game.sort('chan nel');">Channel </th>
<th width="13%" onclick="dsBowl Game.sort('team 1');">Team 1</th>
<th width="13%" onclick="dsBowl Game.sort('team 2');">Team 2</th>
<th width="10%" onclick="dsBowl Game.sort('scor e');">Score</th>
<th width="8%" onclick="dsBowl Game.sort('winn er');">Winner</th>
<!--<th onclick="dsBowl Game.sort('stev e');">Steve's Pick</th>
<th onclick="dsBowl Game.sort('bran don');">Brandon 's Pick</th>-->
</tr>
<tr spry:repeat="ds BowlGame">
<td align="center"> {@id}</td>
<td align="center"> {name}</td>
<td align="center"> {date}</td>
<td align="center"> {channel}</td>
<td align="center"> {team1}</td>
<td align="center"> {team2}</td>
<td align="center"> {score}</td>
<td align="center"> {winner}</td>
<!--<td align="center"> {steve}</td>
<td align="center"> {brandon}</td>-->
</tr>
</table>
</div>
Any suggestions, help, what not is greatly appreciated!