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 [email protected] 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: [email protected] 
[mailto:[email protected]] On Behalf Of ext Benjamin Poulain
Sent: Tuesday, March 22, 2011 6:05 PM
To: [email protected]
Subject: Re: [webkit-qt] Query Regarding .XHT Format file Parsing Support from 
QtWebkit

On 03/22/2011 09:33 AM, ext [email protected] 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
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-qt


_______________________________________________
webkit-qt mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-qt
_______________________________________________
webkit-qt mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-qt

Reply via email to