W3C home > Mailing lists > Public > www-html@w3.org > May 1999

Re: XHTML empty elements

From: John Whelan <whelan@itp.unibe.ch>
Date: Wed, 5 May 1999 15:26:07 -0400 (EDT)
To: alatus@earthlink.net, www-html@w3.org
Message-id: <199905051925.VAA27241@itp4.unibe.ch>
> | I understand the compatibility issue, but I still think that the statement
> | in 4.1.6 is a problem, because of the br element type declaration in
> | http://www.w3.org/TR/WD-html-in-xml/DTD/xhtml1-strict.dtd which is:
> |
> | <!ELEMENT br EMPTY>

> | How can a validating XML parser (that conforms to XML 1.0) check the
> | constraint of sec 4.1.6 that it is an error to write <br></br>?

> My understanding of the term, "Empty element" is that it simply has no valid
> attributes. i.e. you can't say <br class="style"> or something like that.

This is clearly an incorrect definition, as plenty of empty elements
(hr, link, img, frame, col, ...) can take attributes.  And br itself
is allowed to take id, class, style or title (and clear, in the
transitional DTD) as an attribute.

> Although, just writing that gives me an interesting idea... what if <br
> line="3"> created the HTML equivelent of <br><br><br>? Is there any
> practicality in that?

This is the sort of thing that should be done with stylesheets.  I
doubt you'll see any more presentational attributes added to HTML
elements.
					John T. Whelan
					whelan@iname.com
					http://www.slack.net/~whelan/
Received on Wednesday, 5 May 1999 15:30:08 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 27 March 2012 18:15:39 GMT