W3C home > Mailing lists > Public > public-webapps@w3.org > January to March 2009

[widgets] Media type declarations

From: Marcos Caceres <marcosc@opera.com>
Date: Wed, 18 Feb 2009 16:35:50 +0100
Message-ID: <b21a10670902180735j70692e99h4c65a0f5d6e009ee@mail.gmail.com>
To: public-webapps <public-webapps@w3.org>
Given numerous emails regarding requiring that we allow authors to
identify and/or override the MIME types of files in a widget, I would
like to propose the following requirement for the Widgets
Configuration Document section of the Requirements document; as well
as the following technical solution for the P&C spec.

RXX. MIME type declaration
A conforming specification MUST either specify or recommend a means of
allowing authors to declare the MIME type of resources for the
purposes of rendering or processing at runtime.

    Web and offline distribution, and device independence.
    To give authors control over how resources are treated by a widget
user agent. For example, to allow authors to declare that a file with
the extension .php should actually be treated as having the
'text/html' MIME type.

For  the configuration document, I propose the following strawman:

==The media Element==

The media element allows authors to associate custom MIME type with a
particular file extension.

Context in which this element may be used:
    In the widget element.
Content model:
    Zero or more.

   The file extension to which the MIME type identified by the type
attribute will be assigned to.
   The MIME type assigned to any file whose extension matches the
value of the ext attribute.

<widget xmlns="..." >
   <media ext='php' type='application/html+xml' />

=== ISSUES/Questions ===
Do we allow authors to override default types? For example, is this allowed?

   <media ext='html' type='application/html+xml' />

Do we allow mapping of multiple extensions to a single type? e.g.
   <media ext='php cfm asp' type='text/html' />

Another idea that people have floated around is to have an independent
manifest document (manifest.xml). I guess it would look something

<manifest xmlns='...'>
   <file path="/some/path.file" type="some/type" [charset=""] />
   <file path="/some/other/path.file" type="some/other+type" />

Kind regards,

Marcos Caceres
Received on Wednesday, 18 February 2009 15:36:32 UTC

This archive was generated by hypermail 2.3.1 : Friday, 27 October 2017 07:26:14 UTC