You know how sometimes you offer to build someone a proof of concept that should take about half an hour, and then it takes days? I did that.
I have a fairly simple bibliography. I'd like to present it as a web page, and give the user three choices: this list should be sortable by author, year of publication, and title. This choice can be presented as the page is loading (so, to re-sort, one must reload) or as buttons or hyperlinks.
The stylesheet itself took no time; it's the choice I'm stumped on. I suspect this can be done fairly trivially with a combination of XSL and JavaScript, but find JavaScript impenetrable. Been trying off and on for a few days to extrapolate from what I'm finding online, to no avail. Perhaps you can help, with or without JavaScript?
Here's the XSL I've got so far, with some assistance from StackOverflow folk. Suggestions on how to modify it for choice?
To summarize: I'd like to use the xsl:sort
with the first three parameters (pSortNameAuth
, pSortNameYear
, pSortNameTitle
) interchangeably, based on user input.