W3C home > Mailing lists > Public > html-tidy@w3.org > October to December 1999

22 Oct 99 update and empty content elements

From: Jelks Cabaniss <jelks@jelks.nu>
Date: Mon, 25 Oct 1999 01:40:03 -0400
To: <html-tidy@w3.org>, "Dave Raggett" <dsr@w3.org>
Message-ID: <NBBBICMNIPCICMKJECCBMEHNDAAA.jelks@jelks.nu>
Tidy still drops things like

   <div></div>
   <span></span>

and, most noteworthily:

   <div id="foo"></div>

which one may not want to occur.

Not sure if this should be covered by something like a

   drop-empty-elements: bool

or if leaving them alone should not also be the default if there is an ID or
CLASS (or any attribute?).  In the case with IDs in particular, one may intend
to *insert* content using the DOM (I have myself had this need).

I would think that (and this would apply [x]HTML as well as generic XML docs)
one would *not* want to have empty-content elements removed.  In general, that
is -- the exception being "drop-empty-paras" in [x]HTML, which was instituted
for the reasons noted.

One could get around Tidy's stripping those by saying

   <div id="foo">&nbsp;</div>

and thus actually providing some content, but *should* that be required?

/Jelks
Received on Monday, 25 October 1999 01:39:56 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 3 April 2012 06:13:42 GMT