I have been trying to figure this one out myself. It seems like it should be pretty easy, but it's a lot harder than it looks. Every example I've seen using the old working-draft namespace and I need to use the new one.
well the way i did it, and maybe not the way you are trying to do it, is to pass a param back to the xsl page identifying the local-name of the element you want to sort on.
and then you need to pass in the local-name of the node that relates to the column in the table to the xsl stylesheet in the onclick function of the <td> tag.
the part of the xsl that generates the table headers will look a bit like this:
.. and when you generate the page with "myscript.blah" pass the value "sortname" to the xsl stylesheet as a parameter, which should then sort the results of the data correctly.
ps i have not tested any of this, but feel free to ask if you have problems.
probably not what you want, but just in case i thought i'd mention it anyway.
if your implementation is solely html, then you might want to consider using a client side javascript to do the work for you...write your table out and the javascript can rearrange it using the html dom
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.