﻿<?xml version="1.0" encoding="utf-8" ?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:msxsl="urn:schemas-microsoft-com:xslt" exclude-result-prefixes="msxsl">
	<xsl:output method="html" indent="yes" version="4.0" />
	<xsl:output omit-xml-declaration="yes" />
	<xsl:key name="pers-per-maand" match="pers" use="@Maand" />
	<xsl:template match="NewDataSet">
		<table width="100%">
			<Tr>
				<td>
					<b>
						Naam
					</b>
				</td>
				<td>
					<b>
						Organisatie
					</b>
				</td>
				<td style="width: 80px;">
					<b>
						Functie
					</b>
				</td>
			</Tr>
			<xsl:apply-templates select="website_groepen">
				<xsl:sort select="@functie" order="descending"/>
				<xsl:sort select="@achternaam" order="ascending"/>
			</xsl:apply-templates>
		</table>
	</xsl:template>
	<xsl:template match="website_groepen">
		<tr>
			<td>
				<xsl:choose>
					<xsl:when test="string-length(@emailadres) &gt; 1">
						<a>
							<xsl:attribute name="href">
								mailto:<xsl:value-of select="@emailadres"></xsl:value-of>
							</xsl:attribute>
							<xsl:value-of select="@persoon"></xsl:value-of>
						</a>
					</xsl:when>
					<xsl:otherwise>
						<xsl:value-of select="@persoon"></xsl:value-of>
					</xsl:otherwise>
				</xsl:choose>
			</td>
			<td>
				<xsl:value-of select="@organisatie"></xsl:value-of>
			</td>
			<td>
				<xsl:value-of select="@functie"></xsl:value-of>
			</td>
		</tr>
	</xsl:template>
</xsl:stylesheet>
