Re: [xsl] Rescuing XSLT from Niche Status

Subject: Re: [xsl] Rescuing XSLT from Niche Status
From: Uche Ogbuji <uche.ogbuji@xxxxxxxxxxxxxxx>
Date: Fri, 16 Feb 2001 23:37:37 -0700
> > A colleague of mine has written an excellent paper describing a new way
> > of looking at creating XSLT documents.
> This is just what some people call the "pull" method.
> In fact XSLT has a mechanism which is specifically there to make it act
> more like the ASP type of templating language that you mention.

Pull is a bad idea from the didactic POV.  If one wants people to learn how to 
generate HTML and other simple documents as quickly as possible, there is no 
doubt that most people with any background in the more popular computer 
languages would catch on to pull more quickly than push.

But it's a false simplicity.  Pull is easy when the problem space is simple, 
as is the case with so many toy examples necessary when teaching beginners.  
But programming difficulty scales at an alarming rate with the complexity of 
the problem space.  It doesn't take long to run into real-world examples where 
pull is nearly impossible to program correctly.

Push on the other hand, while for some people more difficult at first, is a 
much more powerful approach for solving complex problems.  And in alomst all 
cases it is less prone to defect and easier to maintain.

This is not functional programming bigotry for its own sake.  Since the 
invasion of webmasters and amateurs of scripting, it is easy to forget that 
document processing is one of the most delicate areas of inquiry in computer 
science, and it has called for elegant solutions from Knuth's TeX to Clark & 
co's DSSSL, to XSLT.  As Paul Tchistopolskii explained here.  XSLT at its best 
is about pipes and filters.  XSLT's weakest points are where this model breaks 

Whether your favorite conceptual module is pipes and filters, tuple spaces, or 
just good ol' lambdas, a fundamental understanding of push techniques is 
esential if you want to ever do any serious development in XSLT.  New arrivals 
to this field take short-cuts only to get lost later.  From a purely practical 
point of view, I think it's important to teach apply-templates, modes and 
friends well before for-each, and bitchin' value-of tricks.

Computing began with lambdas, and lambdas are still the cleanest form of 
computing.  While other programming models succumb to hideous complexity in 
the presence of such real-life inconveniences as parallel processing, 
asynchronous events and chaotic problem spaces, lambdas never lose their 
essential elegance.

Of course, all that having been said, I'm still one of the klutziest Scheme 
programmers about.

So much for finery.

Uche Ogbuji                               Principal Consultant
uche.ogbuji@xxxxxxxxxxxxxxx               +1 303 583 9900 x 101
Fourthought, Inc.                
4735 East Walnut St, Ste. C, Boulder, CO 80301-2537, USA
Software-engineering, knowledge-management, XML, CORBA, Linux, Python

 XSL-List info and archive:

Current Thread