Eric van der Vlist wrote:

     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
        "application/vnd.sun.xml.writer".

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, for example).

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.

-Erik


------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click _______________________________________________ orbeon-user mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/orbeon-user

Reply via email to