<?xml version='1.0' encoding='UTF-8'?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" xmlns:xalan="http://xml.apache.org/xalan" exclude-result-prefixes="extensions xalan" xmlns:fnplm="urn:fnplm:lmadmin" xmlns:extensions="urn:fnplm:lmadmin">
<xsl:output method="html"/>
<xsl:param name="selectedVendor" select="''"/>
  
  <xsl:template match="/" name="vendorSelectionForm">
    <xsl:apply-templates select="//fnplm:vendors"/>
  </xsl:template>

  <xsl:template match="fnplm:vendors">
      <select name="vendor">
        <xsl:apply-templates select="fnplm:vendor"/>
      </select>
  </xsl:template>
  
  <xsl:template match="fnplm:vendor">
     <xsl:text disable-output-escaping="yes">&lt;</xsl:text>option value="<xsl:value-of select="./@name"/>"<xsl:if test="./@name=$selectedVendor">SELECTED</xsl:if><xsl:text disable-output-escaping="yes">&gt;</xsl:text>
     <xsl:value-of select="./@name"/><xsl:text disable-output-escaping="yes">&lt;</xsl:text>/option<xsl:text disable-output-escaping="yes">&gt;</xsl:text>
  </xsl:template>
</xsl:stylesheet>

