<?xml version="1.0"?>
<!-- edited with XML Spy v2.5 NT  - http://www.xmlspy.com -->
<xsl:stylesheet xmlns:xsl="http://www.w3.org/TR/WD-xsl" xmlns:html="http://www.w3.org/tr/rec-html40" result-ns="">
<!-- Sort nodes -->
<xsl:template match="/">
<HTML><BODY>
   <SELECT>
	<xsl:apply-templates select="xml/rs:data/z:row" order-by="@*[1]"/>
   </SELECT>
<BR/>
<PRE>HTML Code : 
<TEXTAREA COLS="80" ROWS="20">
<SELECT>
	<xsl:apply-templates select="xml/rs:data/z:row" order-by="@*[1]"/>
</SELECT>
</TEXTAREA>

</PRE>
</BODY></HTML>
</xsl:template>
<xsl:template match="z:row">
<OPTION>
   <xsl:attribute name="value"><xsl:value-of select="@*[nodeName()=/xml/s:Schema/s:ElementType/s:AttributeType[@rs:keycolumn='true']/@name]" /></xsl:attribute>
   <xsl:for-each select="/xml/s:Schema/s:ElementType[@name='row']/s:AttributeType">
   	<xsl:choose>
   		<xsl:when test="@rs:keycolumn[text()='true']"></xsl:when>
   		<xsl:otherwise><xsl:value-of select="context(-2)/@*[nodeName()=context(-1)/@name]" /> </xsl:otherwise>
   	</xsl:choose>			
   </xsl:for-each>  
</OPTION>
</xsl:template>
</xsl:stylesheet>
