[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: "G. Ken Holman" <gkholman@xxxxxxxxxxxxxxxxxxxx>
Date: Thu, 16 Oct 2008 10:41:38 -0400
Re:  zero width no-break space to prevent tag minimisat
At 2008-10-16 15:31 +0100, Andrew Welch wrote:
> Not sure what you mean by "minimization" in this case.

I mean <div/> where <div></div> has been "minimized" to the empty
syntax... I thought it was the right terminology?

Yes, that is end-tag minimization. There are many aspects of markup minimization and I didn't know which one you were after. But I wasn't sure you were even talking about markup minimization since that is typically irrelevant to the browser, thinking perhaps you might be talking about avoiding the minimizing of table borders.


Why not just <xsl:comment/> to inject "<!---->"?

<div><xsl:comment/></div>

That is character set independent.

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.

Good point... the "target browser" are XHTML based mobile phones...
but I would expect that if the browser can display XHTML then it must
support unicode?

I couldn't say ... because XHTML still has a character set declaration in META elements, a subset of Unicode might still be specified by a page or perhaps assumed by a user agent.


I hope this helps.

. . . . . . . . . . . . Ken

--
Upcoming XSLT/XSL-FO hands-on courses:      Wellington, NZ 2009-01
Training tools: Comprehensive interactive XSLT/XPath 1.0/2.0 video
Video sample lesson:    http://www.youtube.com/watch?v=PrNjJCh7Ppg
Video course overview:  http://www.youtube.com/watch?v=VTiodiij6gE
G. Ken Holman                 mailto:gkholman@xxxxxxxxxxxxxxxxxxxx
Crane Softwrights Ltd.          http://www.CraneSoftwrights.com/s/
Male Cancer Awareness Nov'07  http://www.CraneSoftwrights.com/s/bc
Legal business disclaimers:  http://www.CraneSoftwrights.com/legal

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.