Re: [xsl] Things that make you go Hmmmm!

Subject: Re: [xsl] Things that make you go Hmmmm!
From: Michael Kay <mike@xxxxxxxxxxxx>
Date: Fri, 28 Mar 2014 20:34:17 +0000
On 28 Mar 2014, at 19:47, Ihe Onwuka <ihe.onwuka@xxxxxxxxx> wrote:

> the question was why the select attribute appears on xsl:copy in xslt 3.0

You've been asking a lot of such questions recently, and if you're interested,
then you would probably find it rewarding to study the process by which these
decisions are made and the language evolves. There is far too little study in
our profession of the social processes that cause our systems to evolve in the
way that they do. Most of the discussions that take place are purely anecdotal
(often descending to "the guy who designed this must have been an idiot"), and
very few researchers have made a serious and scholarly attempt to understand
the way things actually happen. The fact is, some of the brightest people in
the business get involved in language design, but they don't always make good
choices. There are many reasons for that, for example they perceive the
requirements incorrectly, they imagine the skills of the target user base
differently, and so on. The most important factor is that there is usually
tension between different designers with different perspectives making
compromises to accommodate each other and reach agreement. Another factor is
that (despite the "bicycle shed syndrome") there is a tendency for committees
to focus on the big and difficult problems and sometimes neglect low-hanging
fruit. Another is that the design process does not include enough feedback; by
the time people start reporting their usability experiences, the decisions are
difficult to change. And of course a very big factor is that many decisions,
once made, are extremely difficult to change.

The specific reason why xsl:copy/@select wasn't added until 3.0 is that no-one
suggested it. I never heard any request for it in 10 years of working with the
language, and only discovered the need myself when trying to implement the 3.0
snapshot() function. Clearly this shows that the use case for it is not very
strong, but my philosophy is that orthogonality in design is more important
than having a use case for everything, and I managed to persuade my colleagues
(who don't always share the same philosophy) to fill this gap.

In fact, 9 times out of 10 when people ask why something is the way it is, I
find the answer is that no-one came up with the idea of it being different.
There are exceptions, of course: for example when people ask why XSLT uses XML
syntax, we can point to the arguments and discussions and negative experience
with DSSSL that led to everyone thinking this was the right thing to do.

Michael Kay

Current Thread