W3C home > Mailing lists > Public > html-tidy@w3.org > July to September 2001

RE: Tidy becomes less forgiving

From: Fred Bone <Fred.Bone@dial.pipex.com>
Date: Mon, 17 Sep 2001 18:22:59 +0100
To: html-tidy@w3.org
Message-ID: <3BA63F83.12639.1CEEFF7@localhost>
On 17 Sep 2001 at 12:40, Reitzel, Charlie wrote:

> Hi Fred,
> I think the distinction between an element and a tag is an SGML-ism that is
> new to me.  Thanks for pointing it out.  I continue to learn much while
> working on Tidy.  In the TBODY declaration, does the pair of O's mean that
> both the begin and end tags are optional?

Yes! The TBODY element is required (i.e. every TABLE must have a TBODY 
as its sole mandatory component), but you don't need to mark its 
beginning or end with a tag.

>  Thus, the existence of the
> #IMPLIED by the presence of a descendant (e.g. <tr>)?

If the start tag is optional, then there has to be some required content 
that isn't shared with any other "competing" (*) element having an 
optional start tag (obviously: otherwise you have an ambiguous 
specification). Here, it's TR: although this can also turn up in THEAD 
and TFOOT, each of those has a required start tag, so if you find a TR 
hanging around loose, it must be part of an implied TBODY.

(*) by which I mean any other element valid in the same context: here, 
immediately enclosed in a TABLE.

(However, "#IMPLIED" is an SGML keyword that applies to *attribute* 
declarations ...)

Actually, the HTML4 spec has a very good summary of the features of SGML 
that HTML uses. Section 3, "On SGML and HTML", and in particular (for 
present purposes) 3.3.3 "Element declarations".

.. F
Received on Monday, 17 September 2001 13:23:50 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:38:50 UTC