- From: Lachlan Hunt <lhunt07@postoffice.csu.edu.au>
- Date: Thu, 13 Nov 2003 17:29:26 +1100
- To: W3C HTML List <www-html@w3.org>
Ernest Cline wrote: >... if an author wishes to indicate that a png file is preferable to a gif (As is usually the case. :)) then instead of: > ><span type="image/png, image/gif; q=0.1" src="../images/115"> > Image #115 ></span> > >One could use: ><span type="image/png" src="../images/115.png"> > <span type="image/gif" src="../images/115.gif"> > Image#115 > </span> ></span> > Although the above example should work, The reason for making the type attribute a list of media types, rather than only a single type is because it is better to be able to use the same URI and recieve a different version based on what can be understood by the UA. In the example given in section 6.6 of the current working draft (2003-05-06) [1]: <p src="w3c-logo" type="image/png, image/jpeg;q=0.2">W3C logo</p> the URI is specified without a file extension, though the actual file delivered by the server will be either w3c-logo.png or w3c-logo.jpg. This uses content negotiation with the server, rather than specifying which particular file version is needed within the page. (The document "Cool URIs don't change" [2], as well as some other various documents on W3, explain this concept much better than I have) >I see no reason why type should be changed from being advisory as it is in >HTML4 to being proscriptive as it is in the XHTML2 draft. > Type is only meant to be advice about what content types are available, to allow the UA to build the HTTP request header appropriately. It just allows multiple content-types to be specified which will be quite useful for some authors. [1] http://www.w3.org/TR/2003/WD-xhtml2-20030506/mod-attribute-collections.html#col_Embedding [2] http://www.w3.org/Provider/Style/URI
Received on Thursday, 13 November 2003 01:29:27 UTC