Re: Type Attribute (was: AW: AW: XHTML 2.0 and hreflang and type)

  Oskar Welzl wrote:

>you see, the main difference between a descripive HTML 4-@type and the advisory/prescriptive @type in the XHTML 2.0 draft shows when you consider 
>
><span src="img.gif" type="image/png">hey?! what is it now??</span>
>
>let us assume the image is image/gif, not image/png. the author simply made a mistake.
>
  I think this is the author's problem, not a problem with XHTML.  
Author's need to take more care any way when writing XHTML 2.0, since 
it's rules (particularly structure rules) are more strict than HTML 
was.  We definatley want to stay as far away from those 
tag-soup-browser's style of parsing, and rendering, of HTML as much as 
possible.  So the above example should not be too much, if any, concern 
for XHTML 2.0.

>in HTML 4, it hardly matters. the UA will probably try to fetch the file, anyway, with its default accept-header. no problem.
>
  This is very much like the browser saying "I don't care what you've 
told me, I'll just do what I think is right".  i.e. Tag-soup style parsing!

>according to XHTML 2.0 (may 2003 draft), the UA "must" change its accept header to image/png only. (from the draft, 6.6: "The user agent must combine this list it with its own list of acceptable media types by taking the intersection")
>
  Again, this is both the author's error and concern, not that of XHTML 
and the browser.  When the author finds that a 406 response is being 
returned, or atleast sees that the image won't load, I'm sure the author 
will find and fix the problem (well... hopefully).

>this example is to illustrate why the XHTML 2 way of using @type is far from being "advisory" only. it's a firm 'must', not a 'should better' or 'could'.
>
  What's the point of the attribute, if the browser essentially ignores 
it anyway, and just sends off it's request with it's default accept header?

>again, the "more advice" is exactly the point. it restricts the behaviour of the UA more than it should by telling it to strip all other values from its accept header. (from the draft, 6.6: "The user agent must combine this list it with its own list of acceptable media types by taking the intersection")
>
1. Why would the UA want to reqest any type it doesn't support? and
2. Why would the UA want to request any type that is not available?
   (or, at least, that it has not been told is available?)

  Aren't Those questions what taking the intersection of the two lists 
solves?

>...what about:
><p src="document" type="application/xhtml+xml, text/html">
>what would the user agent do to guess which version of the document is preferred... is it document.xml? document.html? document.htm? ...
>
  How would a server make this decision, given the same situation?

CYA
...Lachy

Received on Sunday, 16 November 2003 00:15:31 UTC