[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Sorting by attribute
My XML looks something like this: <related> <para><link internal="part2" text="c"/></para> <para><link page="test 1" text="a"/></para> <para><link page="test 2" text="d"/></para> <para><link page="test 3" text="b"/></para> </related> I want to apply the link template to each of these, sorting them based on what's in the text attribute. I tried the following but got an "unspecified error when I tried to display with IE5: <xsl:template match="related"> <xsl:for-each select="para"> <xsl:sort select="link/@text"/> <div><xsl:apply-templates/></div> </xsl:for-each> </xsl:template> Could someone kindly set me straight. Thanks. Eric XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|