Re: [xsl] Understanding why <tag></tag> is the way it is (was Re: [xsl] IE Client side transformation issue)

Subject: Re: [xsl] Understanding why <tag></tag> is the way it is (was Re: [xsl] IE Client side transformation issue)
From: Abel Braaksma <abel.online@xxxxxxxxx>
Date: Fri, 03 Aug 2007 19:41:00 +0200
Manfred Staudinger wrote:
On 03/08/07, Abel Braaksma <abel.online@xxxxxxxxx> wrote:
There is a cdata-section-elements on xsl:output, but not a
never-minimize-elements attribute or something similar.
There is no need for such an attribute, because MSXML3 handles
the two cases differently. If you specify in your stylesheet
<div style="display: none"/> it becomes <div style="display: none" />
(invalid html)
but
<div style="display: none"></div> becomes <div style="display: none"></div>
in the output.

Note that there is _no_ need to using nbsp or xsl:comment to ensure valid html !

Yes, I know, you wrote this earlier on in the thread and I wonder if I can apply this to my situation, where I have a lot of client side (and server side) transformations. Very valuable tip!


But it is not always MSXML doing the transform. You may as well have Daisy installed which uses Cocoon which uses XSLT 1.0, in which case you do need the comment hack (or any other server side situation where you are locked in to XSLT 1.0).

Current Thread