My question is how to do multi sorting fields. For example: <category> <subcat> <type>tablet</type> <name>panadol</name> <subcat> <subcat> <type>tablet</type> <name>panamax</name> </subcat> <subcat> <type>something</type> <name>blah blah blah</name> </subcat> ........ </category> The expected result is: 1. tablet a. panadol b. paramax 2. something a. blah blah blah Please help! and apologise if my question is already posted previously.
In case you ask for XSLT solution, you normally just have several <xsl:sort> statements, like <xsl:for-each select="..."> <xsl:sort select="someField"/> <xsl:sort select="anotherField"/> ... </xsl:for-each>
I want to ask the same question as above with extra requirements...That is how to select DISTINCT <type> content and display all relevant of <name> under each type, and both elements must be sorted alphabetically... I have tried your solution above and it wouldn't work at all. I manage to display Distinct <type> by using <xsl:if> to compare the current node with the preceeding node (after sorting of course) but the <name> just wouldn't be sorted at all. Any suggestion? Thanks...
Leverager of our synergies
Joined: Aug 26, 2000
This is more complicated. You need to use the horrendous Muenchian method Adapted for our example version will be like
[ December 27, 2002: Message edited by: Mapraputa Is ]