[Warning: This blog-entry is for geeks, not human beings]

I'm doing some work on WarCMS, the content-management software used at Jgaa's Internet. WarCMS was originally written in 2002, as a simple php/mysql content-management system with focus on security and multi-lingual capabilities. Now I'm migrating it to a hybrid, where some tasks are done in php and some in a back-end-server written in C++. (The configuration-utility is written in Python.)

This will improve the security even more, and boost the performance to a new level.

I'm also migrating the generated output from html 4 to xhtml 1 or 1.1. One of the first tasks is to make a master-template for a new xhtml/css table-free layout, without any JavaScript or other annoyances. The template must of course comply 100% with international standards.

After about two weeks of intense coding (mostly in C++), I had a template up and running with the basic functionality. It validated with validator.w3c.org ("This document was successfully checked as XHTML 1.0 Strict!"), and worked perfectly in Firefox and Opera. I have no plans to support the obsolete Internet Explorer 6 browser, but I expected Internet Explorer 7 to work.

Just to make sure, I installed Vista in vmWare ('m running Linux as my primary operating system) , and tried it with IE 7. The first thing I noticed was that my cool css menus appeared to be dead. Then, the second time I tried to load the page, I got this obscure error-message:

 

Screendump

Also:

The XML page cannot be displayed
Cannot view XML input using style sheet. Please correct the error and then click the Refresh button, or try again later.

The server did not understand the request, or the request was invalid. Error processing resource 'http://www.w3.org/TR/xhtm...

 

It turns out that Internet Explorer is loading the dtd from w3c.org on every page-request(!), causing so excessive traffic at w3c that they have blocked out requests from Internet Explorer.

I'm stunned. My work-around was to add the following lines to the  C++ server:

boost::regex re_msie("^Mozilla/\\d+.\\d+ \\(compatible; MSIE \\d+.\\d+;.*", boost::regex::extended|boost::regex::icase);
            wsd.mNonXmlCompliantBrowser = boost::regex_match(userAgent, re_msie)

And use this to prevent the content-type in the HTTP header from being text/xml in index.php:

if (mNonXmlCompliantBrowser)
 
$http_content_type="text/html";
else
   $http_content_type="text/xml";

header("Content-type: " . $http_content_type);

 

You can read more about the problem with IE and xml/w3c in the link below.