Re: Re: How to output open/close tags independently?
2002-12-31 07:55:48
At 2002-12-30 19:09 -0500, Wendell Piez wrote:
At 2002-12-30 15:44 -0700, Edward L. Knoll wrote:
Not that I'm picking on you specifically Wendell, but your reply was the
most blatantly representative of a class of responses of a particularly
XSL purist/snobbish nature which I find extremely objectionable. There
was a reply from a Mitch Amiano which actually supplied a suggested
approach which "appeared" entirely reasonable, so tried it out.
...
(2) The reason d-o-e is "not recommended" has to do with something much
more subtle than whether it "works" or not. The problem with it is that
it's a feature that is (a) not mandated for compliance (i.e. not all
processors have it, so it's not portable), and (b) dependent on a
processing stage (serialization directly after the transform) which may or
may not happen. This means that it sometimes works (and works well, if
you're careful), and sometimes doesn't work at all. (This has all been
said on the list before.)
My recommendation has been *if* you understand the dependency introduced
by d-o-e, and *if* you are sure that's fine for your case, then go ahead
and use it. But if you don't understand it, or if you can't be quite
certain the dependency will never be a problem -- stay away from it.
Well said, Wendell.
Unfortunately, we also have a higher-level problem in that this advice has
to be given repeatedly on this list, and in all those repetitions I and
some others may come off as "purist" and even "snobbish", taking such
trouble to warn new users about something so arcane (and evidently so
useful). Yet it is scary to think of the alternative -- how the list would
howl if we recommended d-o-e, and then had to deal with a permathread of
"you recommended d-o-e and now my stylesheet won't work in X!".
I, too, have received private comments regarding being too "ivory tower" in
adhering to a portable theoretically-based solution, yet solutions based on
sound principles will last longer and be used in more areas than a hack
(and, yes, I think d-o-e= used for start and end tags is a hack).
(You can take a peek at http://www.mulberrytech.com to decide whether you
think we do real work.)
Ed, did you not think Wendell's experience and background and that of his
talented colleagues at their company warrants respect for his taking the
time to advise people of the proper way of doing things?
This perma-thread of d-o-e= use will be perpetuated as long as people don't
realize the proper way of doing things and understand the repercussions of
not doing things properly. On this subject by "proper" I mean that XSLT is
a node manipulation language not used just for the production of XML syntax
... more and more embedded XSLT systems are relying on "proper" node
production for downstream use by other processes.
Learning a syntactic shortcut of producing angle brackets will only leave a
black mark on XSLT processing when users are unaware of doing things the
right way and their mimicking of techniques from a mail list end up not
working in their embedded XSLT system.
*So* many people learn XSLT by mimicking what they read on mail lists,
which is why Wendell and I and others take the care to relate what we
believe are the proper ways of doing things. We aren't criticizing the
efforts of others to try and help, but it seems important to try and cut
short misunderstandings of why things appear to work when not founded on
design principles that are guaranteed to work.
Though you say you are not specifically picking on Wendell, I get the
impression you are picking on all those who are trying to help spread
correct understandings of features of this technology. Using a hack in
ignorance will have long-term repercussions and recommending such a hack
without highlighting the drawbacks is a disservice to the readers of the list.
..................... Ken
--
Upcoming hands-on in-depth XSLT/XPath and/or XSL-FO:
- North America: Feb 3 - Feb 7,2003
G. Ken Holman mailto:gkholman(_at_)CraneSoftwrights(_dot_)com
Crane Softwrights Ltd. http://www.CraneSoftwrights.com/s/
Box 266, Kars, Ontario CANADA K0A-2E0 +1(613)489-0999 (F:-0995)
ISBN 0-13-065196-6 Definitive XSLT and XPath
ISBN 0-13-140374-5 Definitive XSL-FO
ISBN 1-894049-08-X Practical Transformation Using XSLT and XPath
ISBN 1-894049-10-1 Practical Formatting Using XSL-FO
Male Breast Cancer Awareness http://www.CraneSoftwrights.com/s/bc
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
|