6 replies [Last post]
gleddy
gleddy's picture
Offline
Leader
sydney, australia
Last seen: 11 years 15 weeks ago
sydney, australia
Timezone: GMT+10
Joined: 2004-09-21
Posts: 596
Points: 0

heya,

kinda started asking this in another thread, but don't want to derail it.

We discussed that the <xml> prologue throws IE into quirksmode, so best to leave it out. But upon some google searches many sites say it is best form to put it in (when using DTD strict I assume)

But if it causes unpredictable behaviour in browsers, then what instance would I actually consider using the <xml> prologue that would benefit me?

cheers!

Anonymous
Anonymous's picture
Guru

Re: &lt;xml&gt; prologue

gleddy wrote:
what instance would I actually consider using the <xml> prologue that would benefit me?
In the instance that everyone rightly stops using IE. Laughing out loud

gleddy
gleddy's picture
Offline
Leader
sydney, australia
Last seen: 11 years 15 weeks ago
sydney, australia
Timezone: GMT+10
Joined: 2004-09-21
Posts: 596
Points: 0

&lt;xml&gt; prologue

ah yes... I see again, the dreaded IE comprimises we all have to make. Evil

Hugo
Hugo's picture
Offline
Moderator
London
Last seen: 4 years 31 weeks ago
London
Joined: 2004-06-06
Posts: 15668
Points: 2806

&lt;xml&gt; prologue

It is meant to be used when writing an Xhtml document, but it is not strictly required, when serving up xhtml as mime type text/html it is perfectly acceptable to drop it from use as it will not effect standards Switching, this is as discussed on W3C and to which I posted a link to very recently.

It is therefore dropped due to the fact that content before the DTD will trip up IE.

Hugo.

Before you make your first post it is vital that you READ THE POSTING GUIDELINES!
----------------------------------------------------------------
Please post ALL your code - both CSS & HTML - in [code] tags
Please validate and ensure you have included a full Doctype before posting.
Why validate? Read Me

Chris..S
Chris..S's picture
Offline
Moderator
Last seen: 6 years 47 weeks ago
Timezone: GMT+1
Joined: 2005-02-22
Posts: 6078
Points: 173

&lt;xml&gt; prologue

I know this goes against the grain in these forums. But I do recall reading (and it made some sense to me at the time) that using the XML prolog and leaving IE6 in quirks mode may not be a bad thing --- if you are going to ensure your design works correctly with IE5. After all if its going to work in IE5 it will work unchanged in IE6 quirks mode, so there is no need to bother with IE6 no quirks.

If however you are prepared to your page to degrade gracefully under IE5 then I guess you are better off without the prolog. Its the sort of decision that should be taken "eyes open" - when you understand the consequences of both choices. For those that don't understand the issues "no prolog" is a whole lot more sensible than "prolog".

Hugo
Hugo's picture
Offline
Moderator
London
Last seen: 4 years 31 weeks ago
London
Joined: 2004-06-06
Posts: 15668
Points: 2806

&lt;xml&gt; prologue

Hm, that muddies the water on a subject that causes a lot of people confusion, but is a view that has it's merits and does make sense to a large degree, but as you say that is path to take for those that understand the subject and the majority struggle with it .

The idea doesn't go against the grain though Chris, the concern is always primarily working in and coding to Standards, that a certain browser cannot cope with things is it's fault if someone presents work fully formed with prolog, DTD then they are doing there job correctly and to the standards we all harp on about, it's just sad that we have to tell most to remove the prolog in order to solve IE quirkiness.

I would still recommend that people leave it out and work with IE in standards mode and make the allowances for IE5 in quirks.

Hugo.

Before you make your first post it is vital that you READ THE POSTING GUIDELINES!
----------------------------------------------------------------
Please post ALL your code - both CSS & HTML - in [code] tags
Please validate and ensure you have included a full Doctype before posting.
Why validate? Read Me

roytheboy
roytheboy's picture
Offline
Guru
North Wales, UK
Last seen: 6 years 3 weeks ago
North Wales, UK
Timezone: GMT+1
Joined: 2004-09-18
Posts: 2233
Points: 41

&lt;xml&gt; prologue

Since it is easy to code around the box-model problem (e.g. by not using padding or margins on fixed-width 'holding' divs, but using them on images and paragraphs inside the divs instead), I would agree with Hugo. Adding the odd additional hack for IE5 is simpler (to my mind) than having to deal with both IE5 and IE6 in quirks mode.

Life's a b*tch and then you die!