<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
	<xsl:output method="html" encoding="UTF-8" indent="yes" omit-xml-declaration="yes"/>
	<xsl:template match="/">
		<xsl:for-each select="//sortable_fields">
			<select name="optSort" class="text" style="display: none;" disabled="disabled">
				<xsl:attribute name="id">SORTOPT<xsl:value-of select="@for"/></xsl:attribute>
				<xsl:for-each select="./field">
					<option>
						<xsl:attribute name="value"><xsl:value-of select="@name"/></xsl:attribute>
						<xsl:variable name="tag_name" select="@name"/>
						<xsl:value-of select="//field[@name=$tag_name]"/>
					</option>
				</xsl:for-each>
			</select>
		</xsl:for-each>
	</xsl:template>	
</xsl:stylesheet>
