in reply to Perl + Ajax + XML + MySQL

The idea of AJAX is to initiate (asynchronous) requests per Javascript to update part(s) of an already loaded page, thus avoiding a full page reload.

So, you have server side processing in AJAX.

Also it is my understanding that after the XSLT transformation you are dealing with the resulting DOM tree in your browser (Javascript).

Typically the task to sort (web) client side is addressed fully client side inside the DOM (with Javascript).

A solution to it (going far beyond your request) may look like this.

Replies are listed 'Best First'.
A reply falls below the community's threshold of quality. You may see it by logging in.