Subject: RE: how to close html tags : link, meta,...
From: "B. Tommie Usdin" <btusdin@xxxxxxxxxxxxxxxx>
Date: Wed, 13 Aug 2003 11:40:50 -0400
|
At 8:36 AM -0600 8/13/03, Martinez, Brian wrote:
> > "Elements that are declared in the DTD as EMPTY can have an
>> end tag or can
>> use empty element shorthand (see Empty Elements)."
>
>But <div/>, which is the element Andrew specifically referred to, is *not*
>defined as EMPTY in the DTD. It should not be written minimized.
This is a misconception. If this instance of this element is empty
it may be encoded using a sole tag (<div/>). The XML Specification makes
no distinction between an element that is defined as empty and one that
happens to be empty this time. Either may be represented as nose to nose
tags <div></div> or a sole tag </div> at the discretion of the application.
(I think it is a loss not to have that distinction, but we don't have it,
and we should not pretend that we do.)
If you are producing content for an application that cannot
deal with the sole tag I suggest putting a space into the content
of the element. (Alternately, at least when targeting IE, you can
put a meaningless attribute into the sole tag - which seems to
solve the problem although I don't know why.)
-- Tommie
--
======================================================================
B. Tommie Usdin mailto:btusdin@xxxxxxxxxxxxxxxx
Mulberry Technologies, Inc. http://www.mulberrytech.com
17 West Jefferson Street Phone: 301/315-9631
Suite 207 Direct Line: 301/315-9634
Rockville, MD 20850 Fax: 301/315-8285
----------------------------------------------------------------------
Mulberry Technologies: A Consultancy Specializing in XML and SGML
======================================================================
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|