﻿<?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 omit-xml-declaration="yes" />

	<xsl:template match="NewDataSet">
		<xsl:for-each select="bijeen">
		<xsl:sort data-type="number" select="@Datum" />
		<table cellpadding="0" cellspacing="0" border="0">
			<tr valign="middle">
				<td style="width: 100px;">
					<xsl:if test="string-length(@Alfa) &gt; 0">
						<div style="height: 100px;">
							<img>
								<xsl:attribute name="src">
									/Ledenbijeenkomsten/<xsl:value-of select="@Alfa"/>
								</xsl:attribute>
							</img>
						</div>
					</xsl:if>				
				</td>
				<td>			
					<b><a target="_blank" style="color:black !important; font-weight: bold !important;">
													<xsl:attribute name="href">
														<xsl:choose>
															<xsl:when test="@Guid">
																<xsl:choose>
																	<xsl:when test="@Perbij">
																		<xsl:value-of select='concat("/ASP/Authenticate.asp?a=5&amp;b=", @Id, "&amp;r=LWV&amp;g=", @Guid)'/>
																	</xsl:when>
																	<xsl:otherwise>
                                    <xsl:value-of select='concat("/ASP/Authenticate.asp?a=5&amp;b=", @Id, "&amp;r=LWV")'/>
                                  </xsl:otherwise>
																</xsl:choose>
															</xsl:when>
															<xsl:otherwise>
                                <xsl:value-of select='concat("/ASP/Authenticate.asp?a=5&amp;b=", @Id, "&amp;r=LWV")'/>
                              </xsl:otherwise>
														</xsl:choose>
													</xsl:attribute>
												<xsl:value-of select="@Bijeenkomst"/>
											</a></b><br/>
					<xsl:if test="string-length(@Regel1) &gt; 0">
						<xsl:value-of select="@Regel1"></xsl:value-of><br/>
					</xsl:if>
					<xsl:if test="string-length(@Regel2) &gt; 0">
						<xsl:value-of select="@Regel2"></xsl:value-of><br/>
					</xsl:if>
					<br/>
				</td>
			</tr>
		</table>
		</xsl:for-each>
	</xsl:template>

</xsl:stylesheet>

