Has anyone else run into this, and better yet, solved it?:
We serve our help from an HTML 1.1-compliant web server (not from Apache or IIS).
Because the output files extension is .htm, our web server sends text/html as the MIME Type. This is fine for Firefox (and, apparently, it would be fine on Apache or IIS, which have auto-corrected for this problem).
However, because IE7 and IE8 interprets MIME Type by inspecting the *content* of the file, not by looking at the file extension, it sees the output files are XML, not HTML files.
And because of this MIME Type mismatch, IE does not server the help pages.
Note: This is not the "Mark of the Web (MOTW)" problem being discussed in another thread.
We think that this problem could be resolved if the output files had a .xml rather than a .htm extension. However, when I used the "Use custom file extension for topics" target file option to generate topics with the .xml extension, it clobbers the Master page .xml file, so you end up with a Master page that is the wrong one.
I tried saving the Master page before compiling the help, then restoring it in the output area, but that didn't work.
I suppose one thing to try would be, after compiling the help, to run a script that changes all .htm files to .xml files, but this would also have to change the filenames in links inside the output files themselves, and maybe in Javascript files as well. So this seems a very risky solution.
Has anyone encountered this and solved it?
.htm extension vs. XML file format problem
-
- Propeller Head
- Posts: 72
- Joined: Sun May 03, 2009 12:45 pm
-
- Propeller Head
- Posts: 72
- Joined: Sun May 03, 2009 12:45 pm
Re: .htm extension vs. XML file format problem
Hmm. Looking at the thread on "XML prolog before DOCTYPE declaration: trouble for IE6" makes me think there's a better solution for me than changing all the output extensions from .htm to .xml.
Instead, if I could get the XML prolog to *follow* the HTML Doctype declaration in the .htm files, I'll bet IE would render my WebHelp.
That is, instead of:
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns:MadCap="http://www.madcapsoftware.com/Schemas/MadCap.xsd">
...
</html>
I want:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns:MadCap="http://www.madcapsoftware.com/Schemas/MadCap.xsd">
...
</html>
<?xml version="1.0" encoding="utf-8"?>
But, alas, the other thread doesn't report successfully solving this. The suggestions for manually reversing the order (e.g., in Notepad) in the Master Page doesn't seem to affect order in the output files.
Any other suggestions?
Thanks,
- Willie
Instead, if I could get the XML prolog to *follow* the HTML Doctype declaration in the .htm files, I'll bet IE would render my WebHelp.
That is, instead of:
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns:MadCap="http://www.madcapsoftware.com/Schemas/MadCap.xsd">
...
</html>
I want:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns:MadCap="http://www.madcapsoftware.com/Schemas/MadCap.xsd">
...
</html>
<?xml version="1.0" encoding="utf-8"?>
But, alas, the other thread doesn't report successfully solving this. The suggestions for manually reversing the order (e.g., in Notepad) in the Master Page doesn't seem to affect order in the output files.
Any other suggestions?
Thanks,
- Willie
Re: .htm extension vs. XML file format problem
This discussion is pretty much beyond me, other than the fact that I don't think switching the extensions to .xml will work.
Lisa
Eagles may soar, but weasels aren't sucked into jet engines.
Warning! Loose nut behind the keyboard.