Re: [xsl] When to use text()

Subject: Re: [xsl] When to use text()
From: Ihe Onwuka <ihe.onwuka@xxxxxxxxx>
Date: Fri, 21 Mar 2014 18:37:19 +0000
Wendell and Mike Kay and now Martin Holmes

The word blame appeared my original response because Wendell said that
"text() is over-used and commonly misused".

I said "I wouldn't be blaming the programmers for that."

That meant and means that users of the language are not to blame for
such common misuse. It does not mean that the language
designers/implementers or anyone else is to blame.

If someone says or hints in such a circumstance that you should read
the specification that does suggest blame for the person who did not
do so and I have already elaborated on reasons why that IMHO is not
justified in this instance.

A recent experience of mine  parallelizes this somewhat although it
may be a stretch for some.

My housemate and I have a policy of doing whatever is in the laundry
basket irrespective of whose clothes they are. Recently I returned
from the gym threw my clothes in the basket, showered and rushed out
for an appointment. While I was in the shower my housemate did the
laundry and on my way out I kept hearing a knocking sound from the
machine. When  I returned I discovered that the knocking sound was my

My housemate had intuited that the presence of my kit in the laundry
basket meant it was ok to go straight into the wash.

The equivalent of RTFM was to expect him to have checked my sweaty
pockets first.

How many of you would have done that?

PS That situation like this was possible to resolve without apportioning blame.

On Fri, Mar 21, 2014 at 6:04 PM, Wendell Piez <wapiez@xxxxxxxxxxxxxxx> wrote:
> Hi,
> On Fri, Mar 21, 2014 at 1:40 PM, Graydon <graydon@xxxxxxxxx> wrote:
>> (In this particular case; whitespace text nodes and comments and
>> processing instructions can throw a lot more than that off if you
>> suppose they're never there.)
> Exactly. I think the problem is deeper than the name of text(). They
> could have named it text-node(), which might have exposed the issue
> better, but it wouldn't have solved it. (Instead of the beginners
> jumping to incorrect conclusions, they'd go "huh?", and then jump to
> incorrect conclusions.) The deeper problem is the much more common
> one, that we don't like being surprised when things are different and
> more complicated than we imagined going in. Why do we have comments,
> PIs, or mixed content at all? They are such a pain. (Because it's a
> *markup language*, Sweetie.)
> Then, I suppose, it's nice to have someone else to blame. James Clark
> and Steven J. DeRose! If only the XPath 1.0 Rec had correctly
> anticipated what I am thinking today, this entire problem could have
> been avoided!
> Or, there's an alternative approach. Heiko, who started this thread,
> demonstrated it. Stay alert, don't assume all your guesses must be
> correct, and ask questions.
> Cheers, Wendell
> --
> Wendell Piez |
> XML | XSLT | electronic publishing
> Eat Your Vegetables
> _____oo_________o_o___ooooo____ooooooo_^

Current Thread