﻿<?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="xml" indent="yes"/>

	<xsl:template match="/">
		<xsl:variable name="itemID" select="AjaxRequest/Params/ItemID"></xsl:variable>
		<xsl:variable name="ContentLinkedToBrandXml" select="AjaxRequest/ContentLinkedToBrand"></xsl:variable>
		<xsl:variable name="CommunityID" select="AjaxRequest/Params/CommunityID"></xsl:variable>
		<div style="width:90%">
			<select id="ddlAttachItemID"  style="width:80%" onchange="UpdateContentLink_3_0({$itemID},'ddlAttachItemID','divEditAttachment')">
				<option value="-99">--Select--</option>
				<xsl:for-each select="$ContentLinkedToBrandXml/Item">
					<xsl:choose>
						<xsl:when test="$CommunityID=ContentItemID">
							<option value="{ContentItemID}" selected="">
								<xsl:value-of select="ContentName"/>
							</option>
						</xsl:when>
						<xsl:otherwise>

							<option value="{ContentItemID}">
								<xsl:value-of select="ContentName"/>
							</option>
						</xsl:otherwise>
					</xsl:choose>

				</xsl:for-each>
			</select>
		</div>
	</xsl:template>
</xsl:stylesheet>
