Re: inconsistency

* Ken Innes IV wrote:
>On the page:
>http://www.w3.org/TR/WD-html40-970708/interact/scripts.html#adef-type-SCRIPT
>
>It states:
>"... document authors must explicitly tell user agents the language of each
>script. This may be done either through a default declaration or a local
>declaration."

http://www.w3.org/TR/WD-html40-970708/ is obsoleted by
http://www.w3.org/TR/1998/REC-html40-19980424/ which is obsoleted by
http://www.w3.org/TR/1999/REC-html401-19991224/ which in the section
you cite states

[...]
  This attribute specifies the scripting language of the element's
  contents and overrides the default scripting language. The scripting
  language is specified as a content type (e.g., "text/javascript").
  Authors must supply a value for this attribute. There is no default
  value for this attribute. 
[...]

You can learn more about the W3C Recommendation Track process on

  http://www.w3.org/TR/#About

which is referenced from the specification you cite, see

  http://www.w3.org/TR/WD-html40-970708/cover.html

>I would assume the validator is incorrect, because if the "type" attribute
>is required for every SCRIPT tag, then a default meta "Content-Script-Type"
>declaration is pointless. Additionally, the page says "It is also possible
>to specify the scripting language in each SCRIPT element via the type
>attribute". If the type attribute is required, it should not say "it is also
>possible".

The validator is not incorrect here, I assume you just referenced the
wrong document type declaration, you could have checked

  http://www.w3.org/TR/WD-html40-970708/sgml/HTML4.dtd

which states

  Typical usage:

  <!DOCTYPE HTML SYSTEM "http://www.w3.org/TR/WD-html40-970708/HTML4.dtd">
  <html>
  ...
  </html>

So a document like

  <!DOCTYPE HTML
    SYSTEM "http://www.w3.org/TR/WD-html40-970708/HTML4.dtd">
  <title></title>
  <script></script>
  <body>
  <p>...
  </body>

should validate. The document unfortunately does not exist, so you would
need to change the system identifier to point at the correct DTD which
seems to be

  <!DOCTYPE HTML
    SYSTEM "http://www.w3.org/TR/WD-html40-970708/sgml/HTML4.dtd">
  <title></title>
  <script></script>
  <body>
  <p>...
  </body>

for which the W3C MarkUp Validator would be unable to find any error,
try http://www.htmlhelp.com/tools/validator/direct.html if you like to
see that yourself.

regards.

Received on Saturday, 12 June 2004 18:06:21 UTC