<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
      <xsl:output method="html" encoding="iso-8859-1" indent="yes"/>
      
      <xsl:template match="/TubeThisWeekend">
            <h3><xsl:value-of select="Header/DisplayTitle"/></h3>            
            <table>
            <xsl:for-each select="Lines/Line">
                        	
            	<xsl:variable name='line-colour'>
				   <xsl:value-of select="BgColour"/>
				</xsl:variable>
				<xsl:variable name='line-text-colour'>
				   <xsl:value-of select="Colour"/>
				</xsl:variable>
				<xsl:variable name='line-link'>
				   <xsl:value-of select="Url"/>
				</xsl:variable>
								
            	<tr>
            		<td>
            			<table style="width:95%">
            				<tr>
			            		<td style="background-color:#{$line-colour};color:#{$line-text-colour};font-weight:bold;padding: 1px 8px 3px 2px;width:25%;">
			            				<xsl:value-of select="Name"/>
			            		</td>
			            		<td style="width:75%;"></td>
			            	</tr>
			            	<tr>
			            		<td style="width:50%">
            						<xsl:value-of select="Message"/>
            					</td>
            					<td style="width:50%;"></td>
            				</tr>
            				<tr>
			            		<td colspan="2" style="width:100%">
            						<a href="{$line-link}" target="_blank">Find out more information here</a>
            					</td>
            				</tr>
            			</table>
            		</td>
            	</tr>
            	
            	</xsl:for-each>
            </table>
            
            <h3>Lifts, escalators etc.</h3>
            
            <table>            	
            	<xsl:for-each select="Stations/Station">
            		<tr><td style="font-weight:bold;width:50%;"><xsl:value-of select="Name"/></td><td style="width:50%;"></td></tr>
            		<tr><td style="padding-bottom:8px;width:50%;"><xsl:value-of select="Message"/></td><td style="width:50%;"></td></tr>
            	</xsl:for-each>
            </table>
            
            <xsl:variable name='logo'>
				   <xsl:value-of select="Header/Attribution/Logo"/>
			</xsl:variable>
			<xsl:variable name='link'>
				   <xsl:value-of select="Header/Attribution/Url"/>
			</xsl:variable>
            <table>
            	<tr>
            		<td>
            			<a href="{$link}" target="_blank" style="text-decoration:none;">
            				<img src="{$logo}" style="border:none;" />
	            			<xsl:value-of select="Header/Attribution/Text"/>	            			
            			</a>
            		</td>
            	</tr>
            </table>
            
      </xsl:template>      
</xsl:stylesheet>
