I just ran into an interesting situation while testing some Flare WebHelp output in IE6, caused by the XML prolog (<?xml version="1.0" encoding="utf-8"?>) being placed before the DOCTYPE declaration (<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">) in my generated topics.
For any "standard"-type content I have, there is no problem with this, whether rendered in FF or IE. The trouble in IE6 comes, however, with some JavaScript code I'm using in certain topics that depends on the use of "strict" mode as opposed to "quirks" mode. It seems that IE6 will use "quirks" mode if there is anything at all preceding the DOCTYPE delcaration (see http://en.wikipedia.org/wiki/Quirks_mode or http://www.quirksmode.org/css/quirksmode.html for some discussion of the matter), and this causes my JS to fail.
In order to ensure that the script runs alright in other browsers, I'm using Flare's "Add DOCTYPE delcaration to generated topics" option in my WebHelp target, which (unfortunately in the case of IE6) inserts it just *after* the XML prolog, but before the HTML element:
Code: Select all
<?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>- Remove the XML prolog altogether:
Code: Select all
<!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> - ...or move the DOCTYPE declaration *before* the XML prolog:
Code: Select all
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <?xml version="1.0" encoding="utf-8"?> <html xmlns:MadCap="http://www.madcapsoftware.com/Schemas/MadCap.xsd"> ... </html>
I dread the thought of having to do some sort of crazy find/replace operation on generated output to accomplish this, and I wondered if anyone else here in the forum might have tackled this issue in some other way. Perhaps a modification to some Flare file used in the output generation process? I'm not too familiar with that set of files (don't even know if they're configurable), but really wouldn't want to mess with them anyway, since customizations would be 1) not officially supported by MadCap and 2) overwritten with future Flare application upgrades.
Any takers?
Thanks in advance,