Re: [xsl] disable-output-escaping

Subject: Re: [xsl] disable-output-escaping
From: Mike Brown <mike@xxxxxxxx>
Date: Mon, 3 Dec 2001 17:43:17 -0700 (MST)
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).

My experience with developers who are well-versed in other languages but
not in XML is that they don't see any compelling reason to maintain such a
markup/text distinction. There is really nothing wrong with wrapping HTML
in XML; this is not indicative of poor application design. 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.

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

I prefer to look at this as a matter of XSLT 1.0 was simply not designed
to output a document type declaration with an internal subset -- just as
it was not designed to output references to entities, entities that are
likely to be the only things declared in the internal subset. So in my
opinion, there is no greater justification for using
disable-output-escaping to write a <!DOCTYPE> with an internal subset than
there is for using it to write an entity reference. It's still a hack.

   - Mike
____________________________________________________________________________
  mike j. brown, fourthought.com  |  xml/xslt: http://skew.org/xml/
  denver/boulder, colorado, usa   |  personal: http://hyperreal.org/~mike/

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


Current Thread