Re: [xsl] XSLT Hello World

Subject: Re: [xsl] XSLT Hello World
From: Graydon <graydon@xxxxxxxxx>
Date: Tue, 25 Mar 2014 12:08:47 -0400
On Tue, Mar 25, 2014 at 09:09:01AM +0000, Ihe Onwuka scripsit:
> On Tue, Mar 25, 2014 at 8:32 AM, Graydon <graydon@xxxxxxxxx> wrote:
> > On Tue, Mar 25, 2014 at 01:20:17AM +0000, Ihe Onwuka scripsit:
[design analogies]
> but Graydon ...the problem here is "hello world"....

"Hello World" is proof that the compiler compiles and you can get output
to the console, it's not of itself an objective.

I'd say the problem is getting stuck on "simple" as in "tossing most of
the context".  XSLT _always has_ all of XML.  XSLT is _expressed_ in
XML, XSLT is a programming language expressed in its data structure.

That's a design decision, and it was certainly a conscious decision.
(One shudders to imagine how such a thing could occur by accident!)

As a decision it makes a lot of people unhappy and there is no help for
that.  It's even arguably clever in the pejorative sense of making
things harder to debug.  It does inescapably mean you you can't get away
from XML when using XSLT.  You always have all of XML.  You don't have
to _use_ all of XML, but you can't toss the context; XSLT is never in a
"simpler than XML" context.

Design principles always serve a purpose.  The purpose is never
legitimately "make the solution simpler than the problem" because the
solution cannot, by definition, be simpler than the problem.  So any
time anybody picks up XSLT, they've already decided they've got a
problem that isn't simpler than XML.  We can hope they're not wrong but
that's one of the things using XSLT means.

> Screw it. My project is going to use JSON.

That's why JSON exists; people who wanted something that was a container
for strings and *didn't* make them deal with the full generality of the
XML context badly enough to create it.

That's not a desire that automatically makes them wrong.

-- Graydon, who admits serious trepidation if they want to start
expressing user documentation in JSON

Current Thread