Re: tag: uri scheme

Hi Larry,

2009/1/22 Larry Masinter <LMM@acm.org>:
>
>>  https://issues.apache.org/bugzilla/show_bug.cgi?id=13986
>
> Astounding. Thanks for that pointer, hadn't seen that history.
>
> Still, communication of a package is different than communication
> of individual components, because there's an explicit processing
> step which is "create the package". Even if there might be
> some reasons why Apache hasn't fixed their configuration files,
> is there any reason to believe that "create a package" software
> couldn't be configured to always use well-known file extensions
> or (if allowed) well-known content-types?

Our current model in that we are thinking of putting into the widget
packaging spec is:

1. match the file extension to a mime type using the extension to MIME
type tables in the packaging spec.
2. if no match is made, then attempt to sniff the mime type.
3. if no match is made, label the file 'unknown/unknown'.

What we could do is add a step 0, where authors could have an
XML-based (or text based) format for declaring extension to MIME
(e.g., php -> text/html) or overriding default extensions to MIME
mappings.

For example,
<types xmlns="http://www.w3.org/ns/widgets">
  <type ext="php" mime="text/html"/>
  <type ext="jsp" mime="text/html"/>
  <type ext="htm" mime="application/xhtml+xml"/>
</types>

The above elements could either just be part of the configuration
document, or could be in a separate file.

> I'll still claim that the closer you are to the origin of the
> data, the more likely you are going to be able to guess the
> context of the data.

probably true.

-- 
Marcos Caceres
http://datadriven.com.au

Received on Friday, 13 February 2009 13:27:33 UTC