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

Uche Ogbuji uogbuji@fourthought.com
Tue, 09 May 2000 21:01:16 -0600


> Norman Walsh wrote:
> > 
> > / Michael Hudson <mwh21@cam.ac.uk> was heard to say:
> > | I'm currently using 4DOM to generate XHTML (in a very crufty way that
> > | I will probably ask for more help on soon), and I'm finding that 4DOM
> > | produces stuff like
> > |
> > | <img src="blah.gif"></img>
> > 
> > Perfectly legit. In XML, there is no distinction between
> > <tag></tag> and <tag/>.
> 
> He said XHTML not XML, a standard supposed to be bacwards compatible.

Quite incorrect.  First of all, XHTML _is_ XML, or more precisely, an XML 
application.  Second, XHTML is _not_ meant to be backwards-compatible.  In 
fact, as I'm sure Norm Walsh would be quick to point out, one of its key aims 
is to break the mess caused by endless layers of backwards-compatibility.

For one thing, HTML allows minimizations that are not well-formed XML (ergo 
XHTML), such as "<BR>" rather than "<BR/>" or "<BR></BR>", but that's just the 
tip 'o the backwards-breaking iceberg, so to speak.

-- 
Uche Ogbuji                               Senior Software Engineer
uche.ogbuji@fourthought.com               +01 303 583 9900 x 101
Fourthought, Inc.                         http://Fourthought.com 
4735 East Walnut St, Ste. C, Boulder, CO 80301-9036, USA
Software-engineering, knowledge-management, XML, CORBA, Linux, Python