﻿<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
  <xsl:output method="xml" omit-xml-declaration="yes" />
  <xsl:key name="mthd_key" match="//*[@mtid]" use="@mtid" />
  <xsl:template match="/">
    <select name="drop_method">
      <option selected="selected" value="">Select a Method</option>
      <option value="">-------------------------------------------</option>
      <xsl:for-each select="//*[@mtid][generate-id() = generate-id(key('mthd_key', @mtid))]">
        <xsl:sort order="ascending" select="."/>
        <option>
          <xsl:attribute name="value">
            <xsl:value-of select="@mtid"/>
          </xsl:attribute>
          <xsl:value-of select="."/>
        </option>
      </xsl:for-each>
    </select>
  </xsl:template>
</xsl:stylesheet>