Shadow Wolf Posted January 26, 2008 Share Posted January 26, 2008 I am learning to work with XML and have been working to apply a couple tutorials with the xml file that I am attempting to work with. The xml I am working with: http://www.animeregister.com/roster.xml I've figured out how to pull the data out that I want and modify the format with a XSL that I have here: http://www.animeregister.com/roster.xsl Now I'm trying to figure out a way to sort through the data, so a user can choose to sort it. I make manual sort by using: <xsl:sort select="@name/> I can change it to ascending, descending and choose level instead of name if I wanted. But I have to make those changes. Is there a way to add multiple sort options? So if they click on Name, it would then ascending sort by name. Clicking on name again, it is now sorted descending by name. If they click on rating it would sort descending by rating, if they click on that again then it would sort ascending and so forth? From looking at some tutorials it looks like I can use a "xsl:when" and "xsl:otherwise" command to display or create my two different order options descending and ascending. But I still can't figure out how to I translate that into a clickable link on X item to change the sort. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.