W3C home > Mailing lists > Public > www-validator@w3.org > March 2001

Re: Minimized P valid XHTML?

From: Osmo Saarikumpu <sendosmo@hotmail.com>
Date: Sat, 31 Mar 2001 22:08:40
To: shane@aptest.com
Cc: www-validator@w3.org
Message-ID: <LAW2-F61eLnHTXRgcpf000062f8@hotmail.com>
>From: "Shane P. McCarron" <shane@aptest.com>

>Osmo Saarikumpu wrote:
> >
> > Well, it certainly clears my problem by narrowing and it to an exact
> > question. So, to clarify:
> >
> > a) according XML 1.0 <colgroup /> is valid (may be used)
> >
> > b) according to XHTML 1.0 <colgroup /> is not valid (must not be used)
> >
> > and the question: which recommendation rules for a xhtml 1 Transitional
> > document?
>
>Clearly, the XHTML recommendation rules for an XHTML document.  However,
>as an editor of this and subsequent XHTML recommendations, my opinion is
>that you are misinterpreting what you are reading.  Section 4 attempts
>to explain the differences between SGML and XML and how those
>differences may effect your documents.  Section 4.3 only tries to
>explain that you need to close non-EMPTY elements that are opened.

That's what I've been trying to find out. My problem has arisen from the 
terminology used in Sec. 4.3, which states:

"All elements other than those declared in the DTD as EMPTY _must_ have an 
end tag." (Emphasis added)

And I've been comparing this sentence with Sec. 2.1, which states:

"In this specification, the word "must" is to be interpreted as a mandatory 
requirement &c."

And such a pedant reading has been initiated by examples of the colgroup 
element in two tutorials (a Finnish book about XHTML and an online tutorial 
in a site to which W3C links).

>However, the example you cite is somewhat weird.  While the colgroup
>element COULD be empty, it makes little sense to use it that way. The
>colgroup element groups columns together and defines common attributes
>of those columns.  Having it empty seems a little twisted.

Well, both of the above mentioned teaching materials have examples using 
_only_ empty colgroups. Contrary to these examples I've been teaching that 
colgroup _must_ be marked with an end tag, regardless of content. And my 
teaching I've based on the wording of Sec. 4.3.

>This is beside the point.  The XHTML 1 Recommendation makes NO
>constraint on how non-EMPTY elements are used in documents.

I see that now. I propose that you change the wording of Sec. 4.3.

>  It attempts
>to explain how the XML constraints differ from those of SGML.  The XHTML
>1 Recommendation does, in section 4.6, specify that elements with EMPTY
>content models must have a closing tag or use the closing element
>short-hand <element/> (an XML-extension).

This Sec. 4.6 has been aiding my confusion, because the examples used (<br 
/>, <hr />) are declared in the DTD as EMPTY and thus it supported 
implicitly my pedantic understanding of Sec. 4.3.

>Beyond this, Appendix C talks about how to construct valid XHTML 1.0
>documents that are compatible with existing browsers. Section C.2 talks
>about Empty Elements.  It recommends that you use <br /> instead
><br></br> so that it works in existing browsers.  Section C.3 talks
>about minimization.  For elements whose content model is NOT empty (like
>the colgroup element), we recommend that you use <colgroup></colgroup>
>instead of <colgroup/> for compatibility. An empty paragraph element
>might be a more interesting example. XHTML 1.0 permits this to be
>specified as <p/>. For backward compatibility with earlier browsers, you
>should use <p></p> instead.
>
>I hope this helps.

Yes, thank you. I can see now that Sec. C.3 would imply that <p /> is valid. 
Nevertheless, this is not clearly apparent when contrasted with the wording 
of Sec. 4.3.

Summa summarum: the minimizing of containers is strictly speaking 
structurally valid, but for compatibility reasons it should be avoided.

Thank you again for clearing this. I'm forwarding this to W3C's HTML Working 
Group Issue Tracking System as the topic has been added there also.

os
--
Osmo Saarikumpu
_________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.
Received on Saturday, 31 March 2001 17:09:12 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 25 April 2012 12:13:55 GMT