in reply to Re: use XML::Twig to insert data in the correct order
in thread use XML::Twig to insert data in the correct order
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.<?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>
|
|---|