So it means I can add data without ordering but order the data when query, right? It's also in my plan. This is my trial to display data in order.
<?xml version='1.0'?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/TR/WD-xsl">
<xsl:template match="/">
<html>
<body>
<table border="2" bgcolor="white">
<tr>
<th>Name</th>
<th>URL</th>
</tr>
<xsl:for-each select="data/record" order-by="+ name">
<tr>
<td><xsl:value-of select="name"/></td>
<td><xsl:value-of select="url"/></td>
</tr>
</xsl:for-each>
</table>
</body>
</html>
</xsl:template>
</xsl:stylesheet>
But I would like to display data in "select" menu in my web form. I have no idea how to order the data with XML before create the "select" field. Please give me the clue. Thank you. |