22 Oct 99 update and empty content elements

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 UTC