Forum Moderators: open
Most apps are very application specific and there is little generic code we use for development. Which basically means development and upkeep time is much longer than it could be. I have started developing a backbone for our apps using Pushlets(AJAX) and XML. Currently the server side of the Pushlets is slim and basically just provides an XML interface to any database on the server and returns queries in XML.
I am considering improving the backbone with XSL, but was wondering how flexible this is in reguards to applications that employ extensive client-side scripting. In my last app, I used javascipt to build a table out of XML, but there are many dynamic features of the table that I'm wondering if XSL can accomplish or not.
I am aware that XSL can sort data during the transformation, but can XSL re-sort the data on another field client-side with the click of a button? If so, would it require altering XSL with javascript, because this seems almost as nontrivial as sorting the table with javascript.
Another example would be: If values are altered by a user, is there any quick way to convert all the information back into XML to send back to the server as an altered record?
I guess my main question is... Is there away to have generic dynamic functionality without the actual data being declared/outlined/populated in javascript.
Just a random though: could XSL be used to generate javascript classes to represent the data? Much like C# classes can be generated from XML schemas.
but can XSL re-sort the data on another field client-side with the click of a button?Yes just pass a param to the xsl stylesheet to indicate the column to sort by. You don't have to modify the xsl with javascript. The script just executes the transformation and displays the result.