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

Re: zero width no-break space to prevent tag minimisat

Subject: Re: zero width no-break space to prevent tag minimisation
From: "Andrew Welch" <andrew.j.welch@xxxxxxxxx>
Date: Thu, 16 Oct 2008 16:04:17 +0100
Re:  zero width no-break space to prevent tag minimisat
> I use that in an application where I have optional content and I'm
> decorating that content with colour ... there is a bug in IE that the
> formatting properties of a "<div/>" bleed to the end of the page, whereas
> they don't if I have "<div></div>" so I use:
>
>  <div  colour,etc>
>    <xsl:value-of select="..."/>
>    <xsl:comment/>
>  </div>
>
> This guarantees the production of the end tag.

I don't think it's a bug... as far as I understand, IE will always use
its SGML parser regardless of whether its parsing html or xhtml, and
because of that <div/> is always seen as just an opening tag (because
its not defined as #EMPTY), so any styles given to that div will apply
to everything that follows it... hence the need to suppress the
minimization and have an explicit closing tag.

Even in XHTML, div shouldn't be minimized - the XHTML output method
will always output <div></div> so you don't get this problem even if
it is ultimately parsed with an SGML parser.



-- 
Andrew Welch
http://andrewjwelch.com
Kernow: http://kernowforsaxon.sf.net/

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

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.
Email
First Name
Last Name
Company
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.