Re: [xsl] XSLT Hello World - outreach

Subject: Re: [xsl] XSLT Hello World - outreach
From: Michael Kay <mike@xxxxxxxxxxxx>
Date: Thu, 27 Mar 2014 18:12:04 +0000
> I wonder how hard it would be to create some limited "Pretty XSLT"
> variant that used more eye-friendly syntax and was converted to real
> XSLT through parsing.
>

Not hard at all; there have been a number of attempts, none of them ever used
by anyone other than their originator, as far as I'm aware.

These things only work if you can map line numbers and error messages back to
the original code. If people have to look at the generated XSLT when
debugging, it quickly becomes easier to write in that syntax in the first
place. Even if you prevail, the next person who takes over your code is going
to convert it to the syntax that everyone else uses.

David is right that there are a number of things that are off-putting about
XSLT:

* the XML-based syntax
* the verbosity, especially in XSLT 1.0
* the limited functionality of XSLT 1.0
* the functional / rule-based processing model
* the indirection between the lexical source/result document and the tree
model

But every language, unless it's a tiny delta over one you already know, has
conceptual hurdles to be overcome, and plenty of people from a wide variety of
backgrounds get over them and learn to enjoy the benefits.

The fact is, there's a lot of competition out there. XSLT is a mid-tier
language. If you look at tag counts in StackOverflow, there are 6-digit counts
for C/Java/PHP/Javascript/SQL, 5-digit counts for
Scala/Erlang/XSLT/Perl/Haskell, and 4-digit counts for O'Caml, XQuery,
Velocity, etc. For a special-purpose language, it's not doing at all badly. In
fact it's probably used by a lot more people than Scala or Haskell, because
there are a lot of people who use XSLT occasionally, like once a month,
because that's how often they need it.

It does disappoint me that so many people write code in Java that could be
much better written in XSLT, but it doesn't greatly surprise me, because there
are so many technologies competing for people's attention, and I'm the first
one to use a tool that I know in preference to learning yet another.

Frankly, I'm happy to just carry on making the tools available, making
information available, and letting the market decide. We've been seeing a 30%
growth in paid-for usage year on year, which is perfectly respectable; I've no
way of measuring the unpaid usage, but there's a consistent level of interest
and thousands of downloads. I don't expect the language ever to get into the
6-figure league with Java etc; but it was never intended to.

Michael Kay
Saxonica

Current Thread