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

Re: Handling of MIME types for markup?

From: Terje Bless <link@tss.no>
Date: Sat, 7 Apr 2001 10:25:43 +0200
To: W3C Validator <www-validator@w3.org>
Message-ID: <20010407104512-b01010701-e36e4424@192.146.238.180>
On 06.04.01 at 14:11, Nick Kew <nick@webthing.com> wrote:

>[...] this applies whenever the validator has to fetch an external DTD.
>
>One element [is] the use of an "Accept: text/*" header when
>SP retrieves a document via HTTP.  The rationale for this is that SP
>has no use for non-text documents, and so shouldn't try to fetch them.
>
>In recent correspondence, Liam has suggested that this may not in
>fact be the best, or even correct, thing to do:
> (1) Not the best, because it can give rise to confusion when users
>     understand markup but not HTTP.

This isn't an issue at that level of the interaction. User messages should
be informative and understandable regardless of the underlying nastyness.
You can pretty much just ignore point #1 in _this_ context (though it's
obviously something that needs to be dealt with in the general case).


> (2) Not correct, because MIME types are defined for 
>     "application/[sg|x]ml" and various other markup.

"text/*" is obviously too narrow.


>Regarding (2), I don't think I understand when it would be right
>to use "application/*ml" in preference to "text/*ml".

Give up! The ways of The MIME are Unknowable. :-)


>So the questions for discussion are:
>  (1) What MIME types *should* we accept?

Every MIME type that SP can handle. This includes text/*ml,
application/*ml, and whatever else they've come up with now. In practice
this probably means that you have to keep track of all defined MIME types
for SGML/XML and accept those -- until you finally give up and just list
*/* :-) -- and allow additional MIME types to be specified with
--http-accept="text/vnd.wap.wml,sgml/*,xml/*" on the command line.


>  (2) If we accept an incorrect MIME type, should we report it as
>      an error?

A warning in SPs output certainly; what to put in *Valet/*.htmlhelp.com I
won't venture an opinion on, but for validator.w3.org I think I'd go for
either quietly ignoring it or making a note of it along the lines of the
note/warning we make for charset mismatches (between HTTP and HTTP-EQUIV).


>  (3) If a server returns an HTTP 406 response (refuses to send a
>      document because it shouldn't be acceptable), how should we
>      report the error?  See "My page doesn't validate" from
>      about March 12th on this list for an example.

"I'm sorry, I am unable to validate this document because an error
 occured when I tried to fetch the specified DTD. This may mean that
 the DTD is missing, a transient network error occured, the server is
 not configured correctly, or that this service does not yet support
 that type of DTD. Contact foo@example.com if you need help. The error
 message was: <bar foo bar: baz baz>".
Received on Saturday, 7 April 2001 04:45:17 GMT

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