﻿<?xml version='1.0' encoding='utf-8'?>
<xsl:stylesheet
	xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:rs='urn:schemas-microsoft-com:rowset'
 	 xmlns:z='#RowsetSchema'
	xmlns:date="http://www.ora.com/XSLTCookbook/NS/dates"
   xml:space="default"
	version="1.0">

	<xsl:param name="category"></xsl:param>
	<xsl:param name="title"></xsl:param>
	<xsl:param name="path"></xsl:param>
	<xsl:param name="url"></xsl:param>
	<xsl:param name="items"></xsl:param>
	<xsl:param name="height"></xsl:param>
	<xsl:param name="citates"></xsl:param>
	<xsl:param name="limit" select="100"/>
	<xsl:param name="titleLimit" select="30"/>
	<xsl:strip-space elements="true"/>
	<xsl:output omit-xml-declaration="yes" />
	<xsl:variable name="apos" select='"&apos;"'/>

	<xsl:template match='//rs:data'>
		<h3 class="ms-standardheader ms-WPTitle'">
			<xsl:value-of select='@ows_LinkTitle' disable-output-escaping='yes'  />
		</h3>
		<table border='0' cellpadding='2' cellspacing='0' width='100%'>
			<tbody>
				<tr>
					<td>
						<div class="wccNewsOneTwo">
							<xsl:apply-templates select='z:row'>
								<xsl:sort select="@ows_Datum" order="descending"/>
							</xsl:apply-templates>
						</div>
						<xsl:variable name="rows" select="z:row" />
						<xsl:if test="count($rows) &lt; 1">
							<div style="padding:10px;">Er zijn geen nieuwsberichten aanwezig in deze categorie.</div>
						</xsl:if>
					</td>
				</tr>
			</tbody>
		</table>
	</xsl:template>

	<xsl:template match='z:row'>
		<table width="100%">
			<tr>
				<td>
					<div class="wccNewsText wccNewsListItem" 
						 onmouseover="this.className='wccNewsTextHover wccNewsListItem';" onmouseout="this.className='wccNewsText wccNewsListItem';">
						<xsl:attribute name="onclick">
							<xsl:value-of select="concat('document.location=', $apos, '/Lists/Nieuwsberichten/DispFormWindexCC.aspx?ID=', @ows_ID, '&amp;Source=', $path, $apos)" />
						</xsl:attribute>
						<table border="0" cellpadding="0" cellspacing="0">
							<tr>
								<td class="wccNewsTd1">
									<xsl:value-of select='number(substring(@ows_Datum,9,2))'/>
									<xsl:variable name="mo">
										<xsl:value-of select='substring(@ows_Datum,6,2)'/>
									</xsl:variable>
									<xsl:choose>
										<xsl:when test="$mo = '01'"> januari </xsl:when>
										<xsl:when test="$mo = '02'"> februari </xsl:when>
										<xsl:when test="$mo = '03'"> maart </xsl:when>
										<xsl:when test="$mo = '04'"> april </xsl:when>
										<xsl:when test="$mo = '05'"> mei </xsl:when>
										<xsl:when test="$mo = '06'"> juni </xsl:when>
										<xsl:when test="$mo = '07'"> juli </xsl:when>
										<xsl:when test="$mo = '08'"> augustus </xsl:when>
										<xsl:when test="$mo = '09'"> september </xsl:when>
										<xsl:when test="$mo = '10'"> oktober </xsl:when>
										<xsl:when test="$mo = '11'"> november </xsl:when>
										<xsl:when test="$mo = '12'"> december </xsl:when>
									</xsl:choose>
								</td>
								<td class="wccNewsTd2">
									<span class="wccNewsHeader">
										<xsl:value-of select="@ows_LinkTitle"/>
									</span>
								</td>
							</tr>
						</table>
					</div>
				</td>
			</tr>
		</table>
	</xsl:template>
</xsl:stylesheet>
