Re: [xsl] XSLT vs Perl

Subject: Re: [xsl] XSLT vs Perl
From: bry@xxxxxxxxxx
Date: Tue, 3 Feb 2004 19:48:10 CET
> David Tolpin wrote:
> >>declarative, functional?
> > 
> > 
> > XSLT is not declarative, perl is as 
>>functional as XSLT.

reference the following article

I accept Dimitre's contention that xslt is a 
true functional language.
Although i seem to remember that some people 
on the haskell list or the functional 
programming list weren't as willing to 
accept that as ultimate proof.

also i had to get out of bed and get the 
xslt programmer's reference off the shelf:

page 13, 4th paragraph:
"So how is using xslt to perform 
transformation on xml better than writing 
custom applications? Well, the design of 
xslt is based on a recognition that these 
programs are all very similar, and it should 
therefore be possible to describe what they 
do using a high-level declarative language 
rather than writing each program from 
If I look here:
I have to say xslt sure looks declarative to 
me, and it sure don't look imperative. So 
what did you think it was?

I don't know Perl, looked at it once and 
thought, i hate this. But I wasn't under the 
impression that Perl is a functional 
language. If you can point me to something 
showing perl is a functional language I 
would be grateful.

Now I haven't read the latest draft of xslt 
2.0 but from what I recall of the earlier 
ones it still struck me as retaining the 
declarative flavor, and was more clearly 
a 'real' functional language. 

> > 
> >>conspires to destroy xslt? 

this was tongue in cheek, since I haven't 
read the latest draft I can't comment on if 
the things I hated are still there, but I 
suppose they still are.

> > I just think that XSLT 2.0 is very close 
to Perl, Python and Ruby,
> > just not yet as mature. What's the need 
for one more language in
> > this family?
> >

I'm thinking that your definition of close 
to and my definition of close to are very 
different.... So if I had to build a server, 
or a media player or something similar, my 
choice of xslt instead of python would not 
seem like I had flipped my lid? Because they 
are close to each other.
I realize of course that this cannot be your 
argument. your argument must be that xslt 
2.0 is now a full-fledged text processing 
language, this would explain references to 
awk in other emails, and you ask why someone 
would want to use xslt 2.0 instead of Perl, 
a language with powerful text manipulation 
well this reminds me of those blog posts I 
see around saying: xslt is too difficult and 
whatever I can do in xslt I can do just as 
easy in language x, the coolest language 
ever, and as an example contrast an xslt 
heavy with xsl:for-each and xsl:choose, 
xsl:attribute, low on xsl:template and 
attribute={$myvar} with a program written in 
language x. 


 XSL-List info and archive:

Current Thread