RE: [xsl] Implementing a (fairly) complex business rule

Subject: RE: [xsl] Implementing a (fairly) complex business rule
From: Wendell Piez <wapiez@xxxxxxxxxxxxxxxx>
Date: Tue, 30 Sep 2008 11:47:48 -0400
Peter,

At 11:12 AM 9/30/2008, you wrote:
That's very clear. Thanks. And your diagnosis is spot on, of course.

You are welcome, of course.


I remember you helping me out some years ago when I was "doing" xslt as
part of an MSc course.  This is my first look at xslt since then, so you
can imagine I've forgotten quite a lot.  It's coming back though -
although you may have to put up with me plaguing the list for a while!

(I got the MSc, BTW, with distinction)

It's good to see that education is serving a purpose, anyway. Remediating buggy machine-generated code on a deadline: that has to fall into the category of dirty jobs someone has to do. Fun.


FWIW, as I suggested, seeing constructs like "normalize-space(element)" vs "string-length(element/text()) &gt; 0" is part of what tips off an expert as to whether code has been written by a skilled practitioner of XSLT/XPath, or by a Perl or Javascript or C programmer who has just jumped in. Or maybe by a program written by one of these estimable people. The best defense I've heard of expressions like the latter is that it's more explicit -- which may be true, if your audience is like you. The most honest is that it's done out of habit.

The XPath way is obscure if you don't know XPath. But I've never felt it was wrong to give those who don't know XPath, but who are trying to program XSLT, a little XPath exercise. :-)

Cheers,
Wendell



======================================================================
Wendell Piez                            mailto:wapiez@xxxxxxxxxxxxxxxx
Mulberry Technologies, Inc.                http://www.mulberrytech.com
17 West Jefferson Street                    Direct Phone: 301/315-9635
Suite 207                                          Phone: 301/315-9631
Rockville, MD  20850                                 Fax: 301/315-8285
----------------------------------------------------------------------
  Mulberry Technologies: A Consultancy Specializing in SGML and XML
======================================================================

Current Thread