<xsl:stylesheet version='1.0' 
				xmlns:xsl='http://www.w3.org/1999/XSL/Transform'
				xmlns:content = 'http://purl.org/rss/1.0/modules/content/'
				xmlns:xhtml='http://www.w3.org/1999/xhtml'
				xmlns:slash='http://purl.org/rss/1.0/modules/slash/' 
				xmlns:dc='http://purl.org/dc/elements/1.1/' 
				exclude-result-prefixes='content slash dc'>

		  <xsl:output method='xml' indent='yes' /> 


		  <!-- channel group newspaper -->
		  <xsl:template match="newspaper[@type='group']">
		    <html><head><title><xsl:value-of select='title'/></title>
		    <!-- <base href="{//channel/link}" /> -->
		    <style type="text/css">
		          body { background-color: #FFFFFF; color: #000000; font-size: 80%; font-family: Tahoma, Verdana, Arial, sans-serif; margin: 2px 28px; }
				  h1,h2,h3,h4,h5,h6 { font-size: 80%; font-weight: bold; font-style: italic;	}
			   a:hover { 
			    color: #FF6600;
			    text-decoration: none
			    }

			    .ChannelTitle { font-weight: bold; font-size: 120%; text-align: center; text-transform: uppercase; margin: 10px 0}
			    li {
			    margin-bottom: 3px 
			    }
		      </style>		</head>
		      <body>
			<table height="100%" width="100%">
			  <xsl:for-each select="//channel">
			  <tr>			    
			    <td class="PostFrame" height="100%" width="100%" valign="top">
			       <div class="ChannelTitle">				     
					<xsl:value-of  disable-output-escaping='yes' select='current()/title'/>				      
				    </div>
			     			    
			      <div class="PostContent">
				 <ol>
				      <xsl:for-each select='current()//item'>
					<li>	
					  <a href='{current()/link}'>
					    <xsl:value-of disable-output-escaping="yes" select="current()/title"/>
					  </a>
					</li>
				      </xsl:for-each>
				      </ol>
			      </div>
			      </td>
			    </tr>
			  </xsl:for-each>
			  </table>
			  </body></html>
			</xsl:template>

			<!-- channel newspaper -->
			<xsl:template match="newspaper[@type='channel']">
			  <html><head><title><xsl:value-of select='//channel/title'/></title>
			  <base href="{//channel/link}" />
			  <style type="text/css">
			    body { background-color: #FFFFFF; color: #000000; font-size: 80%; font-family: Tahoma, Verdana, Arial, sans-serif; margin: 2px 28px; }
				  h1,h2,h3,h4,h5,h6 { font-size: 80%; font-weight: bold; font-style: italic;	}
			   a:hover { 
			    color: #FF6600;
			    text-decoration: none
			    }

			    .ChannelTitle { font-weight: bold; font-size: 120%; text-align: center; text-transform: uppercase; margin: 10px 0}
			    li {
			    margin-bottom: 3px 
			    }

			    </style>		</head>
			    <body>
			      <table height="100%" width="100%">
				<tr>
				  <td class="PostFrame" height="100%" width="100%" valign="top">				  
				    <div class="ChannelTitle">				     
					<xsl:value-of  disable-output-escaping='yes' select='//channel/title'/>				      
				    </div>
				    <!-- <div class="PostInfos">
				    <b><xsl:value-of disable-output-escaping='yes' select="current()/category"/></b>
				    </div> -->
				    <div class="PostContent">
				      <ol>
				      <xsl:for-each select='//item'>
					<li>	
					  <a href='{current()/link}'>
					    <xsl:value-of disable-output-escaping="yes" select="current()/title"/>
					  </a>
					</li>
				      </xsl:for-each>
				      </ol>
				      </div>
				    </td>
				  </tr>
				</table>
				</body></html>
			      </xsl:template>


			      <!-- single news item -->
			      <xsl:template match="newspaper[@type='newsitem']">
				<html><head><title><xsl:value-of select='//item/title'/></title>
				<base href="{//item/link}" />
				<style type="text/css">
				  body { background-color: #FFFFFF; color: #000000; font-size: 80%; font-family: Tahoma, Verdana, Arial, sans-serif; margin: 2px 28px; }
				  h1,h2,h3,h4,h5,h6 { font-size: 80%; font-weight: bold; font-style: italic;	}
				  .PostTitle{
				  font-weight: bold; 
				  margin: 10 px 0;				  
				  }				  				 
				   a:hover { 
				   color: #FF6600;
				   text-decoration: none
				   }

				  .PostTitle a:hover {
				  border-width: 0px;
				  text-decoration: underline;
				  }				 

				  div.PostSignature { 
				  text-align: right;
				  font-family: "trebuchet ms", "lucida grande", verdana, arial, sans-serif;	
				  font-size: xx-small; 
				  font-style: italic;
				  }

				  .PostSignature a { font-size: x-small; }
				  </style>		</head>
				  <body>
				    <table height="100%" width="100%">
				      <tr>
					<td class="PostFrame" height="100%" width="100%" valign="top">					 
					  <div class="PostTitle">
					    <a href='{//item/link}'>
					      <xsl:value-of  disable-output-escaping='yes' select='//item/title'/>
					    </a>
					  </div>					 
					  <div class="PostContent">
					    <xsl:choose>
					      <xsl:when test='//item/xhtml:body'>
						<xsl:copy-of select='//item/xhtml:body'/>
					      </xsl:when>
					      <xsl:when test='//item/content:encoded'>
						<xsl:value-of  disable-output-escaping='yes' select='//item/content:encoded'/>
					      </xsl:when>
					      <xsl:otherwise>
						<xsl:value-of disable-output-escaping='yes' select='//item/description'/>
					      </xsl:otherwise>
					    </xsl:choose>
					  </div>
					  <div class="PostSignature">
					    <a href='{//channel/link}' title='{//channel/description}'><xsl:value-of disable-output-escaping='yes'  select='//channel/title'/></a>
					    <br />Published:
					    <xsl:if test="//item/dc:creator and //item/dc:creator!=''">
					      <xsl:value-of disable-output-escaping='yes' select='//item/dc:creator'/>
					      <xsl:text disable-output-escaping='yes'>&amp;nbsp;</xsl:text>
					      </xsl:if><xsl:if test="//item/author and //item/author!=''">
					      <xsl:value-of disable-output-escaping='yes' select='//item/author'/>
					      <xsl:text disable-output-escaping='yes'>&amp;nbsp;</xsl:text>
					    </xsl:if>
					    <xsl:value-of select='//item/pubDate'/>
					    <xsl:if test='//item/enclosure'>
					      <br />
					      <xsl:text disable-output-escaping='yes'>&amp;nbsp;</xsl:text>
					      <xsl:text disable-output-escaping='yes'>&lt;a href='</xsl:text><xsl:value-of  disable-output-escaping='yes' select='//item/enclosure/@url'/><xsl:text disable-output-escaping='yes'>'&gt;</xsl:text>
					      Enclosure (<xsl:value-of select='//item/enclosure/@type'/>, <xsl:value-of select='//item/enclosure/@length'/> Bytes)
					      <xsl:text disable-output-escaping='yes'>&lt;/a></xsl:text>				
					    </xsl:if>			
					  </div>
					</td>
				      </tr>
				    </table>
				    </body></html>
				  </xsl:template>
				</xsl:stylesheet>
