[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: disable-output-escaping
At 07:43 PM 12/3/01, Mike Brown wrote:
Wendell Piez wrote: > It is significant that people most often try the d-o-e approach when they > are either (1) still naive about the way XSLT works, and projecting > mistaken expectations onto it (see Mike's (b)), or (2) trying to build an > application whose concept or design is already threatening the markup/text > distinction, such as handling ill-formed HTML markup wrapped in XML, or > trying to do "metamarkup" in some way (marking up markup). I agree with this: there's nothing wrong with it in the general case, and whether it's poor application design really depends on other factors. But note I didn't say "wrapping HTML in XML" but "ill-formed HTML wrapped in XML". That is, there's a distinction between an application that does: <chapter> <h1>Chapter One</h1> <p>It was <i>a dark and stormy night</i> and ...</p> </chapter> where the contents of <chapter> is well-formed (X)HTML, and <chapter> <![CDATA[ <h1>Chapter One</h1> <p>It was <i>a dark and stormy night</i> and ... ]]> </chapter> True, in the second case we can still get the HTML in our output (if we write a file using disable-output-escaping). And sometimes this may be the only or best way to do it (i.e. wrap your HTML in CDATA and treat it as text). Most of the time, however, it should be possible to maintain the markup/text distinction by following the syntax rules (here, XML well-formedness) that make that distinction possible -- running HTMLTidy or otherwise fixing any broken HTML before we shovel it in. The advantages of doing it this way are considerable. The problem is merely that they view their intended output as a pastiche of strings, and XSLT as instructions for generating those strings, whereas they should be viewing their output as the serialized form of what is essentially a single XML document that was created one abstract node at a time. This is a nice way of phrasing exactly what I mean. Markup is not text: instead, it is a notation for or representation of something extra-textual -- the structure of abstract nodes. Anyway, this is edging into not being an XSL topic anymore (though you should still feel free to criticize on- or off-list :-). Cheers, Wendell > A third case such as Rick Geimer's writing the internal declaration subset > is the exception that proves the rule. Here, we'd like to write the output > as markup, but since XSLT doesn't give us facilities to manage and output > declarations as markup (strictly the DOCTYPE declaration with its contents > ought to be markup), one has no choice but to fall back on pretending it's > text. ====================================================================== 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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|