> 1. That would be nice if the URL generator could rely on the media
> type given by the OS for local files. For instance, if I read
> a .swx file and that my OS is configured correctly, the URL
> generator could guess that the media type is
Is there a standard mechanism in Java to get the media type of a file
from the OS? With URLConnection, you can get information based on the
content-type header if there is one, or based on content (fairly poorly
implemented in the JDK last time I checked).
Note that the URL generator may access resources from a URLConnection,
or directly from the Resource Manager (who may access files directly,
Or are you just looking at an extension -> media type mapping? In which
case, we could use the same mapping file used by the File server.
> 2. Now, if I force this media type in the config input, I get an
> error: "the value does not match the regular expression "[a-zA-Z
> \-]+/[a-zA-Z\-]+".(schema: http://www.orbeon.org/oxf/xml/url)".
> Shouldn't this pattern be laxer than it is right now?
This definitely looks like a bug.
I have to defer entering those in the bug base because it is being
migrated to ObjectWeb right now.