Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Benefits/Disadvantages of using XSL to render entire web pages

Tags:

xslt

I am in the preliminary stages of planning a project with a client to redo their current website. I took a look at their current site to see what issues they are currently dealing with and upon inspection I noticed that every page is being rendered entirely using XSLT. I am familiar with XSLT, I have used it to render custom controls that need to be refreshed often on the client-side, but never to render an entire page.

Help me become less ignorant, what could be the reasoning behind this? What benefits or disadvantages does this bring to the table?

like image 463
jamesmillerio Avatar asked Jan 07 '09 17:01

jamesmillerio


2 Answers

Sounds like they did it because they knew XSL-T very well and already had XML data on hand.

I wouldn't like the solution myself. XSL-T isn't the easiest thing to read or write. It doesn't lend itself well to visualizing how a page will look. It cuts designers and web developers out of the process. And it doesn't internationalize well. There's nothing equivalent to Java resource bundles that can pull out locale specific information. I don't consider cut & paste a good solution.

like image 147
duffymo Avatar answered Oct 04 '22 03:10

duffymo


XSLT on client side

  • Disables progressive rendering. User won't see anything at all until entire stylesheet and data is loaded completely.
  • Not supported by search engines and other crawlers. They'll see raw XML.
  • Not supported by older/less advanced browsers.

XSLT in general

  • Unless you carefully design your stylesheets, they may quickly become difficult to maintain:
    • with numerous templates it may be very difficult to figure out which templates are applied.
    • verbosity of XSLT and XML syntax make it hard to understand anything at glance.
    • XPath tricks are tempting, but nightmare to modify later.
like image 36
Kornel Avatar answered Oct 04 '22 04:10

Kornel