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 03:37:02 +0200
M. David Peterson wrote:

NOTE: While this may seem off-topic for XSL-List, I would argue that based on the various problems associated with the rendering of HTML via an XSLT transform and <tag></tag> and <tag/> this is really and important topic closely related to XSLT from several different perspectives.

May I add to the tag-closing issue, the (more minor) issue of &apos;, which may inadvertently be created when you render into XML, but may not appear in HTML/XHTML and should either be a numeric entity or the character ' itself (but I can't seem to find a case where a processor would choose &apos; instead of ' where it matters to HTML, but if such a case exists, I doubt there's a workaround).


And let's add this one: in the case of XSLT 1.0, if you choose indent="yes" with method="xml" to create XHTML, be aware of using tags like <pre> or <script> where added white space for indentations may result in dramatic differences in rendering (and this again has much todo with standards, but does not change from HTML to XHTML and don't think you can all of a sudden use xml:space="preserve" with any tag in XHTML)

Current Thread