Mailing List Archive

Support open source code!


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Web pages & Jp. text -THANKS ALL



>>>>> "Michael" == Michael Schubart <michael@example.com> writes:

    Michael> I get the "Congratulations" message from the validator
    Michael> regardless of whether I enter the URL or upload the
    Michael> file.

Right.  That's an important point.  Validator validates HTML, not web
sites.  _There is no standard universally available means for all
conforming HTML 4.01 documents to set their own encodings._  Instead,
in the HTML standard (not the XHTML standard) this is delegated to the
HTTP server by preference.  That means that by preference there is no
internal indication of character set in an HTML 4 document.

Another example.  Suppose the httpd's Content-Type header and the META
tag conflict, and the META tag is correct.  According to HTML 4.01,
sec 5.2 (http://www.w3.org/TR/html4/charset.html):

  To sum up, conforming user agents must observe the following
  priorities when determining a document's character encoding (from
  highest priority to lowest):
   1. An HTTP "charset" parameter in a "Content-Type" field.
   2. A META declaration with "http-equiv" set to "Content-Type" and a
      value set for "charset".
   3. The charset attribute set on an element that designates an
      external resource.

According to this, if validator pays attention to the HTTP headers, it
will return Invalid if it gets the document from the server and Valid
if not.  But this has nothing to do with the validity of the HTML
itself.

    Michael> Maybe I should tell Gerald Oskoboiny from
    Michael> validator.w3.org about this, then.

IIRC, "validator" does exactly that.  It is not intended to be
Weblint.  He will probably reply that the HTML is valid; it is not
validator's job to tell you about bad practice that does conform to
the standard.  There are other tools for that, in particular weblint
itself (http://www.weblint.org/).

See items 20 and 27 in the validator ToDo list.  They're suggestive.

If you don't like this ambiguity in the HTML standard, upgrade to
XHTML.  Validator, at least, will check your XHTML for you.

-- 
University of Tsukuba                Tennodai 1-1-1 Tsukuba 305-8573 JAPAN
Institute of Policy and Planning Sciences       Tel/fax: +81 (298) 53-5091
_________________  _________________  _________________  _________________
What are those straight lines for?  "XEmacs rules."


Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links