[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

Re: [xsl] How to output open/close tags independently?


Subject: Re: [xsl] How to output open/close tags independently?
From: Wendell Piez <wapiez@xxxxxxxxxxxxxxxx>
Date: Fri, 27 Dec 2002 11:53:48 -0500

Hey Mitch,

The horribleness of disable-output-escaping is not (to my mind) really an issue of the well-formedness constraint either in the stylesheet or in the output -- that's something of a red herring (though it is a risk and a sign of the deeper problem). Rather, it's the violation of XSLT's processing model, in which the transformation of the node tree and the post-transformation serialization are clearly distinguished and kept separate by design. *Any* solution that works by writing markup to output using d-o-e creates a dependency on the serialization step. While this may be acceptable in certain circumstances (e.g. writing SGML entity references to output that are not otherwise provided for, when you *know* you're going to write a file), it's horrible at other times, if only because the designer has created this dependency unwittingly, and thus doesn't understand why the transform breaks in a conformant architecture, like Mozilla or transformation chains in Cocoon, where no file is getting serialized.

The relevance of grouping is only that the "write markup" approach is usually resorted to by newer XSLT programmers who don't know how else to do grouping, and who fall back on their Perl or Javascript experience (or just sheer ingenuity) to suppose that writing markup is the best or only solution to the problem (it is neither).

I doubt that any experienced XSLTer would have a problem with either of the solutions you offered (or Dimitre's, or Tom's), since none of them introduce the dependency on serialization that is the problem with d-o-e-based techniques for "outputting open/close tags independently". There the distinctions are much more of coding style and performance; but none of them use a technique that is prone to break the minute you move your stylesheet into a different environment.

Cheers,
Wendell

At 06:23 PM 12/26/2002, you wrote:
I don't see what the connection is between trying to coerce XSLT into accepting non-well-formed markup, and grouping....



====================================================================== 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 ======================================================================


XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list




Current Thread
Keywords