Re: [xsl] Avoiding boneheaded mistakes in XSLT?

Subject: Re: [xsl] Avoiding boneheaded mistakes in XSLT?
From: Graydon <graydon@xxxxxxxxx>
Date: Thu, 30 Dec 2010 12:31:48 -0500
On Thu, Dec 30, 2010 at 05:27:31PM +0000, Dave Pawson scripsit:
> On Thu, 30 Dec 2010 12:08:39 -0500
> Graydon <graydon@xxxxxxxxx> wrote:
> > "Let's scan the transform and see what might be wrong with it" to my
> > mind belongs in a distinct application, much like lint for C back in
> > the day, if it's needed at all.  I think nearly all of the kinds of
> > errors you're talking about can be addressed better by programming
> > style. 
> Yep. Those errors that originate between our ears.
> Lint seldom catches them. 
> btw, the only error I've asked to catch is an xpath resulting
> in an empty sequence. Hardly "all the errors I'm talking about"?

There's a lot of ways to get an empty sequence, aren't there?

And sometimes you want one. ("If we have an attribute FOO, its value
goes here" being the simplest case; sometimes FOO is empty. Maybe you
have to preserve that.)

Restricted case or not, I'm pretty sure it's still a requirement for

-- Graydon

Current Thread