Re: a question about converter

Jiang Tao writes:
> If I register several converters, when will which
> converter be called?

When data is coming in from the network, the stream stack is called with an 
input format, a requested output format and the job for the stream stack 
algorithm is then to find the best match. What exactly is the best match 
depends on the q factor of the converters and how well they "fit" the input 
format and output format requested.

    HTConversion_add(c, "text/html", "www/present", HTMLPresent, 1.0, 0.0, 
0.0);

means that this converter can present all image types (c is a list that can be 
associated with either _all_ requests or a single request as desired). You can 
also register a converter using wild cards like for example 

    HTConversion_add(c, "*/*", "www/present", HTSaveLocally, 0.3, 0.0, 0.0);

means that if nothing better is found then dump it to local file. You can find more examples and descriptions in the User's Guide at

	http://www.w3.org/devel/WWW/Library/User/Using/Prefs.html

-- 

Henrik Frystyk Nielsen, <frystyk@w3.org>
World-Wide Web Consortium, MIT/LCS NE43-356
545 Technology Square, Cambridge MA 02139, USA

Received on Monday, 25 March 1996 18:04:10 UTC