T
Thomas 'PointedEars' Lahn
Osmo said:I'll have to take your word for that, 'cause I can't understand none of
it. From that RFC I can't even see if "text/javascript" would be valid.
Let's have a closer look at the relevant productions then.
The HTML 4.01 Specification[1] defines the following requirements for the
`type' attribute of the SCRIPT element. In the DTD:
| <!ATTLIST SCRIPT
| [...]
| type %ContentType; #REQUIRED -- content type of script language --
| <!ENTITY % ContentType "CDATA"
| -- media type, as per [RFC2045]
| -->
In the prose:
| 6.7 Content types (MIME types)
|
| Note. A "media type" (defined in [RFC2045] and [RFC2046]) specifies
| the nature of a linked resource. This specification employs the term
| "content type" rather than "media type" in accordance with current
| usage. Furthermore, in this specification, "media type" may refer to
| the media where a user agent renders a document.
|
| This type is represented in the DTD by %ContentType;.
|
| Content types are case-insensitive.
|
| Examples of content types include "text/html", "image/png", "image/gif",
| "video/mpeg", "text/css", and "audio/basic". For the current list of
| registered MIME types, please consult [MIMETYPES].
And:
,-[RFC 2045: Multipurpose Internet Mail Extensions (MIME) Part One: ]
| [ Format of Internet Message Bodies ]
|
| 5.1. Syntax of the Content-Type Header Field
(Insofar, I stand corrected. It is acceptable to call the required value
for the `type' attribute of the SCRIPT element a "content type" instead of
"(MIME) media type".)
| In the Augmented BNF notation of RFC 822, a Content-Type header field
| value is defined as follows:
|
| content := "Content-Type" ":" type "/" subtype
| *(";" parameter)
| ; Matching of media type and subtype
| ; is ALWAYS case-insensitive.
|
| type := discrete-type / composite-type
|
| discrete-type := "text" / "image" / "audio" / "video" /
| "application" / extension-token
So `text' of `text/vbscript' can be produced by `type'. However:
| extension-token := ietf-token / x-token
|
| ietf-token := <An extension token defined by a
| standards-track RFC and registered
| with IANA.>
|
| x-token := <The two characters "X-" or "x-" followed, with
| no intervening white space, by any token>
|
| subtype := extension-token / iana-token
|
| iana-token := <A publicly-defined extension token. Tokens
| of this form must be registered with IANA
| as specified in RFC 2048.>
`vbscript' cannot be produced by `subtype' because it is neither can be
produced by `extension-token' (AFAICS) nor by `iana-token':
And, if I'm not completely lost, it would seem to say that
"text/javascript" is obsolete?
It has been *marked* as obsolete, prematurely, due to a (probably
well-intentioned) individual with, however, a doubtful level of experience
about the subject to be defined. In any case, an "obsolete" type is still
*registered* at IANA, and therefore Valid.
Which was my point: valid, but different outcome, by design. I was under
the impression that the type attribute's value was left open mainly for
future implementations.
Yes, but of course in accordance with the IETF/IESG process.
PointedEars
___________
[1] <http://www.w3.org/TR/REC-html40/interact/scripts.html#h-18.2.1>