Will XSLT work with AJAX?

This may be a silly or obvious question, but our entire site is rendered using XSLT for xml conversion, which is created on the fly from database queries and other parts. I'm starting to click a lot of ajax on the site to make it more dynamic, is there a good tutorial on xslt and ajax?

+7
javascript xml ajax xslt
source share
6 answers

I would definitely agree with the previous commentator, who shuddered at the thought that XSLT was making your hard climb. This is not all that a performer is. Don't get me wrong, I like XSL a lot, but ...

Not much tutorial, but people at Mulberry Tech (I don’t know what they are doing or who they are) support a series of Quick Reference Tutorials for XSLT (and many others) that I find invaluable.

http://www.mulberrytech.com/quickref/

hope this helps ...

+2
source share

Do you use XSLT on the server or in browsers?

Modern browsers now support XML transformations from the browser, one way uses AJAX to extract XML along with its stylesheet. You can then offload the processing of style sheets by client machines. Remember to cache the stylesheet and maybe even send compressed XML.

Coding should be straightforward if you already know how to do AJAX. I worked on a system like it was 5 years ago, and this is a viable way.

+2
source share

I think most answers are missing what the OP is asking for. I think the OP is asking if there is a way to get XSLT generated HTML using AJAX.

I use this approach on Umbraco.

  • Create an XSLT macro that generates HTML

  • Place the XSLT macro on a blank page

  • AJAX Call Page

  • Replace existing HTML content

+2
source share

our entire site is displayed using XSLT for xml conversion

This thought makes me tremble. I worked on two sites that used XSLT to do the hard work of dynamically creating frequently used pages, and in both cases it took more development effort and CPU access time than it would cost.

To no avail , www.w3schools.com has many good guides to many web technologies. They even have tests.

If you want to do AJAX by supporting multiple web browsers, I highly recommend you check out: JQuery , Prototype and Dojo

I think jQuery is the best, but I will leave this definition up to you.

+1
source share

I have used this technique extensively, both on the client side and on the server side. My experience is that it works in most scenarios (but then I compare its server-side performance with VBScript in ASP pages).

If performance is a problem, it is very important to take XML parsing and XSLT compilation from an operation where possible. If you have a client-side method that uses XSLT to dynamically display an element on the page, make sure it does not load or compile XSLT every time it invokes. If you are using server-side XSLT server, cache the XSLT processor object in any collection supported by your server environment.

You can get significantly better client-side performance by using Javascript and JSON instead of XML and XSLT. I did not appreciate it, but I would bet that the greatest increase in performance is due to the fact that JSON parsing is much less intense than XML parsing.

+1
source share

Try using tox as an example. There is no tutorial, but if you look at the example provided, it is well commented and includes AJAX.

0
source share

All Articles