Code Generator & an interesting problem with IE6

2 posts by 2 authors in: Forums > CMS Builder
Last Post: May 31, 2008   (RSS)

Re: [mel] Code Generator & an interesting problem with IE6

By Dave - May 31, 2008

Hi Mel,

I think you're totally fine to just remove that line if it's causing problems. Actually the only code you need from the code generator is the Step1, Step2, etc code, and something a meta charset tag.

The echo statement just prints this: <?xml version='1.0'?>
Which encouraged but not required by the W3C for well formed XHTML documents. Search http://www.w3.org/TR/xhtml1/ for "xml version".

The reason why it's in a PHP tag is some installs of PHP are configured to run php code in tags like this <? echo "hello" ?> and so when they see <?xml version='1.0'?> they run it as PHP code and generate an error. So we put it inside a PHP tag to guarantee it won't generate an error.

I haven't heard of that affecting how browsers render the page though. Usually whether or not you have the <!DOCTYPE ... > tag will put the browser in a different render mode (called "quirks mode") or not which will affect that. But other than that I'm not sure.

In any case, all that extra code is optional so you're safe to remove it. Let me know if there's anything else I can do to help! :)
Dave Edis - Senior Developer
interactivetools.com