Re: [xsl] When to use text()

Subject: Re: [xsl] When to use text()
From: Michael Kay <mike@xxxxxxxxxxxx>
Date: Mon, 24 Mar 2014 10:05:37 +0000
On 24 Mar 2014, at 09:12, Alex Muir <alex.g.muir@xxxxxxxxx> wrote:

> On Sun, Mar 23, 2014 at 9:31 AM, Michael Kay <mike@xxxxxxxxxxxx> wrote:
>> 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 don't mind the fact that as a result,
their programs will sometimes be wrong.
> Well I just thought that context sensitive help could be improved as
> it clearly was of little benefit to the developer. It doesn't have to
> be correct all the time, but should give you the most bang for your
> buck concisely to aid recall. Surely that's a good idea or would you
> rather everyone have your book beside the keyboard or memorized? LOL
> ;)

You're absolutely right. I don't have the problem of designing
context-sensitive help, but I do have the problem of designing error messages,
and the same situation arises; you want to be concise, you want to focus on
what the user is likely to have done wrong, and occasionally there's a real
conflict between being helpful and being accurate and precise. Normally, for
example, I use correct terminology in error messages. But before using a word
like "atomization" or "effective boolean value" or "facet" in an error
message, you have to ask yourself whether the user will understand it in the
context where it is used.

The same factors arise with warnings. There are some constructs that are
correct but so likely to mean something different from what the user intended
that I now issue a warning for them; an example is the use of "true" and
"false" where the interpretation is child::true and child::false.

My aim with these things is to be helpful for the 90% of users who aren't
familiar with the fine detail of the spec, without totally pissing off the 10%
who know what they are doing. It's a difficult balancing act.

Michael Kay

Current Thread