<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

	<xsl:output method="xml" indent="no"/>
	
<!-- LINKS COMPONENT -->	
	
	<xsl:template match="compnews">
		<table class="complist" xmlns="http://www.w3.org/1999/xhtml">
			<tr>
				<th><xsl:value-of select="title"/></th>
			</tr>
			<xsl:for-each select="resource">			
			
			<xsl:for-each select="document(concat('res_xml.php?id=', @id))/resource/article">
			<xsl:call-template name="newsdetails"/>
			</xsl:for-each>		
		
			</xsl:for-each>
		</table>
	</xsl:template>
	
	<xsl:template name="newsdetails">		
		<tr xmlns="http://www.w3.org/1999/xhtml">
			<td>
				<h6><xsl:value-of select="../modified_date/month"/>.<xsl:value-of select="../modified_date/day"/>.<xsl:value-of select="../modified_date/year"/> </h6>
				<h4><a href="page_resource.php?pageID={$currentpage}&amp;resourceID={/resource/@id}"><xsl:value-of select="../name"/></a></h4>	
				<p class="detail"><xsl:value-of select="../description" disable-output-escaping="yes"/></p>	
			</td>		
		</tr> 
	</xsl:template>
	
</xsl:stylesheet>

