<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
	<xsl:template match="/">
		<xsl:for-each select="document/elements">
					<table class="newsItem">
						<tr>
							<td class="newsItemImageWrapper" valign="center" align="center">
								<img class="newsItemImage" />
									<xsl:choose>
										<xsl:when test="starts-with(image,'/guid/')">
											<xsl:attribute name="src">
												<xsl:text>/irj/go/km/docs/</xsl:text>
												<xsl:value-of select="image" />
											</xsl:attribute>
										</xsl:when>
										<xsl:when test="starts-with(image,'http')">
											<xsl:attribute name="src">
												<xsl:value-of select="image" />
											</xsl:attribute>
										</xsl:when>
										<xsl:when test="starts-with(image,'/irj/go/km')">
											<xsl:attribute name="src">
												<xsl:value-of select="image" />
											</xsl:attribute>
										</xsl:when>
										<xsl:otherwise>
											<xsl:attribute name="src">
												<xsl:text>/irj/go/km/docs/etc/DynamicList/Mimes/image_not_found.jpg</xsl:text>
											</xsl:attribute>
										</xsl:otherwise>
									</xsl:choose>
							</td>
							<td class="newsItemTextWrapper">
								<a target="_blank" class="gwt_Lnk">
								<xsl:attribute name="href">
									<xsl:value-of select='contentLink'/>
								</xsl:attribute>
								<xsl:attribute name="title">
									<xsl:value-of select='title'/>
								</xsl:attribute>
										<h3>
											<xsl:value-of select="title"/>
										</h3>
									</a>
									<span class="description urTxtStd  urTxtColor">
										<xsl:choose>
											<xsl:when test="string-length(description) &gt; 70">
												<xsl:value-of select="concat(substring(description, 0, 70),'...')"/>
											</xsl:when>
											<xsl:otherwise>
												<xsl:value-of select='description'/>
											</xsl:otherwise>
										</xsl:choose>
									</span>		
								
							</td>
						</tr>
					</table>
		</xsl:for-each>
	</xsl:template>
</xsl:stylesheet>