[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: Preventing tags from collapsing

Subject: RE: Preventing tags from collapsing
From: "Andrew Welch" <ajwelch@xxxxxxxxxxxxxxx>
Date: Fri, 15 Apr 2005 09:49:02 +0100
collapsing div
> Or switch browser.
> A few weeks ago I spent a full day finding out that IE6 produces no
> output if it sees a collapsed script tag (self-contained
> <script /> is
> the correct wording I believe). Confusingly enough it does like
> selfcontained <meta /> and <link /> tags so that rules out total
> ignorance and makes not understanding <script /> a _bug_.

It's not a bug - it's because <meta> and <link> are defined as empty
elements in HTML and so the browser does not expect a closing tag.
<script> on the other hand is not defined as empty, therefore when you
have <script/> IE doesn't recognise that it's an empty element and looks
for a closing tag, effectively making the rest of the content the body
of the script.

The same applies to styling, for example: <div
style="font-weight:bold"/> everything following this div will be bold.

If you are using XSLT 1.0 you either have to use the HTML output method,
or be very careful in your templates to ensure you don't get empty
elements like this your output.

As has been said, if you are using Saxon your are better off moving to a
later version and using the XHTML with your existing 1.0 stylesheets (it
also allows to pick and choose the other great features of 2.0 to use).


Current Thread


Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
First Name
Last Name
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.