Re: [xsl] When to use text()

Subject: Re: [xsl] When to use text()
From: Ihe Onwuka <ihe.onwuka@xxxxxxxxx>
Date: Sun, 23 Mar 2014 10:01:17 +0000
On Sun, Mar 23, 2014 at 9:31 AM, Michael Kay <mike@xxxxxxxxxxxx> wrote:
>> I wonder also if it's more complete to say
>>   test="text()" is true for any non empty text node
>> or is there no text node in for example <cat></cat>?
> XDM allows empty text nodes, but they only exist transiently and never have a parent.
> If there's a lesson from this thread, it's that Ihe and many others don't want complete explanations. They haven't got time for them.

Can only speak for myself here.

Not at all.

I don't want quirky arcane non-intuitive explanations. It's not that
I haven't got time for it but the brain cell has to work to hard to
retain that fact because it's quirky, arcane and non-intuitive. So I
avoid/ignore it until it gets me into trouble and if YAGNI fails I can
come back and search the forum/specification/textbook etc in the
meantime I can acrete knowledge in other domains that will give the
brain cell more bang for it's buck.

For example. I don't understand xsl:number. I've not put too much
effort into understanding it and thanks to YAGNI it's not something
that concerns me.

>They want something short and simple that is true most of the time.

I want the explanation for something that should be short and simple
to be short and simple. Some things are more intricate and you devote
more energy and effort to understanding. Getting text out of a node
however, should be sort and simple.

For problems of a more intricate nature  the list may never know how
much effort goes into that because they don't know what and how many
references you read how often prior to solving the problem yourself
(and thereby not bringing it to the list). I can tell you for instance
that I have read and refreshed up on xsl:key and it's associates more
times than I care to admit.

>They don't mind the fact that as a result, their programs will sometimes be wrong.

Given that we generally don't/can't reason about our programs and we
cannot test them exhaustively that is an inevitable fact of life.

Current Thread