[webkit-qt] Query Regarding .XHT Format file Parsing Support from QtWebkit
Jocelyn Turcotte
jocelyn.turcotte at nokia.com
Wed Mar 23 03:06:02 PDT 2011
Hello,
if you open the file from your web server, please make sure that the
Content-type header value returned is "application/xhtml+xml". You can
verify through the network tab of the inspector in Chrome.
Your web server probably uses the file extension to determine the
Content-type, you might have to tweak you configuration.
If you open the file from disk, QtWebKit has a rather limited way of
associating the file extension to the correct MIME type.
If you look at the file
Source/WebCore/platform/qt/MIMETypeRegistryQt.cpp, you will see that
xhtml is there but not xht.
In that case the only thing you can do is rename the file, modify the
source, or you can try to use QWebFrame::setContent() to load the file
manually and pass the "application/xhtml+xml" mime type.
Note that this limitation only applies when loading the file from a
file:/// URL, if you load it from an HTTP server it should give WebKit
the appropriate MIME type.
Jocelyn
On 3/23/2011 7:40 AM, ext manas.mohanty at nokia.com wrote:
> Hi,
>
> The .xht file and the .xhtml file is having the same MIME Type and content.But I am able to open the .xhtml file and not the .xht file.
> Sample attached for your reference.
>
>
> BR,
> Manas
>
> -----Original Message-----
> From: webkit-qt-bounces at lists.webkit.org [mailto:webkit-qt-bounces at lists.webkit.org] On Behalf Of ext Benjamin Poulain
> Sent: Tuesday, March 22, 2011 6:05 PM
> To: webkit-qt at lists.webkit.org
> Subject: Re: [webkit-qt] Query Regarding .XHT Format file Parsing Support from QtWebkit
>
> On 03/22/2011 09:33 AM, ext manas.mohanty at nokia.com wrote:
>> I am trying to launch an .xht format file. Could anyone please let me
>> know if we have parsing support from QtWebKit for the .xht file?
> XHT is just the windows 3 letter extension for xhtml. If your server report the correct mimetype, there is no reason WebKit could not read that.
>
> cheers,
> Benjamin
> _______________________________________________
> webkit-qt mailing list
> webkit-qt at lists.webkit.org
> http://lists.webkit.org/mailman/listinfo.cgi/webkit-qt
>
>
> _______________________________________________
> webkit-qt mailing list
> webkit-qt at lists.webkit.org
> http://lists.webkit.org/mailman/listinfo.cgi/webkit-qt
More information about the webkit-qt
mailing list