[XML-SIG] How to get 4DOM to output empty <elements />

Norman Walsh Norman Walsh <ndw@nwalsh.com>
09 May 2000 09:10:29 -0400


/ Hannu Krosing <hannu@tm.ee> was heard to say:
| Norman Walsh wrote:
| > / Hannu Krosing <hannu@tm.ee> was heard to say:
| > | He said XHTML not XML, a standard supposed to be bacwards compatible.
| > 
| > I understand that, but it's also supposed to be XML. The most emphatic
| > thing that the XHTML spec could say is that one form or the other is
| > preferred. XHTML has to obey the rules of XML.
| 
| My understanding was that XHTML was supposed to define a subset of XML 
| that is also HTML (and actually accepted and rendered more-or-less ok).
| 
| It is always hard to tell what a recommendation in a "standard" means.

Yep. FWIW, if my concern is for presentation rather than
compliance with the standard, I usually just add a bogus
attribute:

  <br browserhack="html"/>

That works just as well as "<br />" and is often easier to get
tools to render.

                                        Be seeing you,
                                          norm

-- 
Norman Walsh <ndw@nwalsh.com> | Our years, our debts, and our enemies
http://nwalsh.com/            | are always more numerous than we
                              | imagine.--Charles Nodier