W3C home > Mailing lists > Public > www-validator@w3.org > January 2005

Re: Peculiar validation results for certain XHTML 1.1 documents

From: Jukka K. Korpela <jkorpela@cs.tut.fi>
Date: Thu, 6 Jan 2005 20:49:13 +0200 (EET)
To: "T.B. van der Molen" <tbm@home.nl>
Cc: www-validator@w3.org
Message-ID: <Pine.GSO.4.58.0501062040050.10393@korppi.cs.tut.fi>

On Thu, 6 Jan 2005, T.B. van der Molen wrote:

> 0. Is <li /> correct XHTML 1.1 (and correct XHTML 1.0 Strict)?

Yes, but not recommended, since you should use the notation only for
elements with EMPTY declared content.

If you use <li />, it is by definition equivalent to <li></li>.

> I wasn't
> able to find out anywhere on the web.

It's in the XHTML and XML specifications.

> 	Below are the results of attempting to parse this document with
> 	an SGML parser.
> Shouldn't that be an XML parser?

Yes, but the validator is really an SGML validator that has been tuned to
act as an XML validator as well.

> 2. On <http://www.w3.org/MarkUp/2004/xhtml-faq#mime11> I read that using
> the text/html content-type is invalid for XHTML 1.1 documents

"Invalid" is not the right word here.

The FAQ entry says:

"Why is it disallowed to send XHTML 1.1 documents as text/html?

XHTML 1.1 is pure XML, and only intended to be XML. It cannot reliably be
sent to legacy browsers. Therefore XHTML 1.1 documents must be sent with
an XML-related media type, such as application/xhtml+xml."

This, however, is not part of a specification, despite looking like
normative prose. It's actually a debated issue what the W3C
recommendations really say about the issue. But it's not a validation

> But when
> uploading an XHTML 1.1 document with this content-type and the <li />
> tag, the validator asserts that the document has the text/html
> content-type and again says to have parsed the document with an SGML
> parser.

How did you upload it, and how you do know it was uploaded with that
Content-Type, and how could the <li /> tag affect this?

Browsers often don't provide for tools to specify the Content-Type
of documents in file upload. Hence, it is safer to upload the document
onto a Web server and use the "validate by URL" feature.

> 3. On <http://www.w3.org/TR/xhtml11/conformance.html#strict> an example
> XHTML 1.1 document is given that has no content-type meta tag at all.

Who said that meta tags are needed?

> Is the example on the given page incorrect by omitting the meta tag or
> does it simply assume that an HTTP server will be specifying the
> content-type?

The latter.

Jukka "Yucca" Korpela, http://www.cs.tut.fi/~jkorpela/
Received on Thursday, 6 January 2005 18:49:47 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 1 March 2016 14:17:44 UTC