473,383 Members | 1,789 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,383 software developers and data experts.

Does IE have the same problems with XHTML 1.0 Transitional as it does with HTML Transitional?

Hello,

I have read about the problems that IE has when using a doctype of HTML
4.01 Transitional. I was advised to use Strict wherever possible.

My question is, does the same apply to XHTML 1.0 Transitional? I develop
sites using ASP.NET, which emits valid XHTML 1.0 Transitional, but not
XHTML 1.0 Strict (for example, it includes a hidden form field with the
name of _VIEWSTATE, which isn't valid in Strict, but is in
Transitional).

Anyone any comments? The framework is brilliant, but I'm a bit stuck
trying to produce 100% valid code. Am I likely to have any browser
problems with XHTML 1.0 Transitional?

TIA

--
Alan Silver
(anything added below this line is nothing to do with me)
Feb 20 '06 #1
20 2522
Alan Silver wrote:
I have read about the problems that IE has when using a doctype of HTML
4.01 Transitional. I was advised to use Strict wherever possible.
Presumably you're talking about doctype sniffing? IE6 can render a
document in one of two ways: Quirks mode which emulates the flaws of
IE5 and Standards mode which doesn't.

Quirks mode is triggered by a HTML 4.01 Transitional doctype without an
URL (i.e. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01
Transitional//EN">) - note that it is merely the doctype that triggers
the switch to quirks mode. Whether the actual HTML matches the doctype
isn't a factor.

Standards mode is triggered by a HTML 4.01 Transitional doctype with a
URL (i.e. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01
Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">) and by HTML
4.01 Strict doctypes.

XHTML 1.0 (Strict or Transitional) triggers Standards mode unless there
is an XML declaration (e.g. <?xml version="1.0" encoding="UTF-8"?>)
preceeding it in which case Quirks mode is triggered.
My question is, does the same apply to XHTML 1.0 Transitional? I develop
sites using ASP.NET, which emits valid XHTML 1.0 Transitional, but not
XHTML 1.0 Strict
It should be possible to make .net extrude whatever code you want it
to. It's a fairly crap tool if it doesn't.
(for example, it includes a hidden form field with the
name of _VIEWSTATE, which isn't valid in Strict, but is in
Transitional).
Eh?

I just uploaded

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Test Doc</title>
</head>
<body>
<form action="/"><div><input type="hidden" name="_VIEWSTATE"
value="foo" /></div></form>
</body>
</html>

to the validator and it passed. What's the actual error you're getting?
(Note that in Strict, HTML 4.01 or XHTML 1.0, form inputs must be
children of block level elements such as p, div or fieldset and can not
be direct children of form.
Anyone any comments? The framework is brilliant, but I'm a bit stuck
trying to produce 100% valid code. Am I likely to have any browser
problems with XHTML 1.0 Transitional?


Not really. Assuming .net extrudes "Appendix C compliant XHTML
flavoured tag soup served as text/html", then browsers will treat it as
either Quirks Mode (X)HTML tag soup or Standards Mode (X)HTML tag soup
just the same as they would do with HTML 4.01.

Steve

Feb 20 '06 #2
In article <11**********************@g44g2000cwa.googlegroups .com>,
Steve Pugh <st**********@gmail.com> writes
Alan Silver wrote:
I have read about the problems that IE has when using a doctype of HTML
4.01 Transitional. I was advised to use Strict wherever possible.
Presumably you're talking about doctype sniffing? IE6 can render a
document in one of two ways: Quirks mode which emulates the flaws of
IE5 and Standards mode which doesn't.


Erm, here's where my ignorance begins to show!! I was talking about
avoiding quirks mode, which I understand to be fairly evil.
Quirks mode is triggered by a HTML 4.01 Transitional doctype without an
URL (i.e. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01
Transitional//EN">) - note that it is merely the doctype that triggers
the switch to quirks mode. Whether the actual HTML matches the doctype
isn't a factor.

Standards mode is triggered by a HTML 4.01 Transitional doctype with a
URL (i.e. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01
Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">) and by HTML
4.01 Strict doctypes.
Ah, I obviously got the story wrong. I thought it was Transitional that
sent IE into quirks mode and Strict that didn't. Thanks for the
clarification, that makes life much easier.
XHTML 1.0 (Strict or Transitional) triggers Standards mode unless there
is an XML declaration (e.g. <?xml version="1.0" encoding="UTF-8"?>)
preceeding it in which case Quirks mode is triggered.


So, if I have a doctype like this...

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

will this give me standards mode? If so, then I think I have solved my
problem.
My question is, does the same apply to XHTML 1.0 Transitional? I develop
sites using ASP.NET, which emits valid XHTML 1.0 Transitional, but not
XHTML 1.0 Strict


It should be possible to make .net extrude whatever code you want it
to. It's a fairly crap tool if it doesn't.


It may be possible, I don't know. I know that by default it emits XHTML
1.0 Transitional (apparently not Strict as I thought when I posted). I
don't have a problem using that, so I haven't really explored the
possibilities of changing it.
(for example, it includes a hidden form field with the
name of _VIEWSTATE, which isn't valid in Strict, but is in
Transitional).


Eh?

<snip>

OK, I could have got that badly wrong. I know that when I first started
fixing some code, I was getting problems of this sort, but maybe I'm
getting confused now. I'll need to go back and check it again.
Anyone any comments? The framework is brilliant, but I'm a bit stuck
trying to produce 100% valid code. Am I likely to have any browser
problems with XHTML 1.0 Transitional?


Not really. Assuming .net extrudes "Appendix C compliant XHTML
flavoured tag soup served as text/html", then browsers will treat it as
either Quirks Mode (X)HTML tag soup or Standards Mode (X)HTML tag soup
just the same as they would do with HTML 4.01.


Well, as far as I know, it sends out 100% valid XHTML 1.0 Transitional,
excluding the odd bug!!

Thanks very much for the reply. I think your clarification has sorted me
out.

--
Alan Silver
(anything added below this line is nothing to do with me)
Feb 20 '06 #3
Alan Silver wrote:
XHTML 1.0 (Strict or Transitional) triggers Standards mode
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

will this give me standards mode? If so, then I think I have solved my
problem.


Yes ... but client-side XHTML is silly at best[1], and the bits of HTML that
Transitional includes but Strict doesn't are almost entirely legacy junk
that should be avoided.
My question is, does the same apply to XHTML 1.0 Transitional? I develop
sites using ASP.NET, which emits valid XHTML 1.0 Transitional, but not
XHTML 1.0 Strict
Everything I've heard about ASP.NET says to avoid using its built in markup
generating code (due to its low quality). I suggest you find alternatives.
Anyone any comments? The framework is brilliant, but I'm a bit stuck
trying to produce 100% valid code. Am I likely to have any browser
problems with XHTML 1.0 Transitional?


Likely? No, but they do exist. (The problems there are due to the XHTML bit
rather than the Transitional bit though).

[1] Well, there are some exceptions, but they are exceptionally rare.
--
David Dorward <http://blog.dorward.me.uk/> <http://dorward.me.uk/>
Home is where the ~/.bashrc is
Feb 20 '06 #4
On 20 Feb 2006 07:45:11 -0800, "Steve Pugh" <st**********@gmail.com>
wrote:
My question is, does the same apply to XHTML 1.0 Transitional? I develop
sites using ASP.NET, which emits valid XHTML 1.0 Transitional, but not
XHTML 1.0 Strict


It should be possible to make .net extrude whatever code you want it
to. It's a fairly crap tool if it doesn't.


According to a colleague I spoke to at lunch today (well, actually he
was doing most of the speaking), "fairly crap" is being kind. Apparently
..net does the typical Microsoft trick of thinking it knows better than
the developer, and spontaneously changes working files into non-working
files. He was an exceedingly unhappy bunny.

--
Stephen Poley

http://www.xs4all.nl/~sbpoley/webmatters/
Feb 20 '06 #5
In article <dt*******************@news.demon.co.uk>, David Dorward
<do*****@yahoo.com> writes
Alan Silver wrote:
XHTML 1.0 (Strict or Transitional) triggers Standards mode
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

will this give me standards mode? If so, then I think I have solved my
problem.
Yes ... but client-side XHTML is silly at best[1],


By "client-side" I assume you mean normal XHTML. I can't imagine why you
would be writing XHTML on the server.

Anyway, I didn't make the decision to have the framework emit XHTML, I'm
just trying to make valid sites with it!!
and the bits of HTML that
Transitional includes but Strict doesn't are almost entirely legacy junk
that should be avoided.


I probably would, I'm just trying to make sure I don't hit any problems
by using a Transitional doctype.
My question is, does the same apply to XHTML 1.0 Transitional? I develop
sites using ASP.NET, which emits valid XHTML 1.0 Transitional, but not
XHTML 1.0 Strict


Everything I've heard about ASP.NET says to avoid using its built in markup
generating code (due to its low quality). I suggest you find alternatives.


Well, I guess that most of what you heard is either well out of date, or
plain wrong!! Don't misunderstand me, I'm not saying it was always like
this (it wasn't...), but the latest version of the framework outputs
100% valid XHTML (barring bugs, of which there are few if any in this
area), all conforming to accessibility guidelines. MS have done an
astonishing about face on this one. They used to be the prime offenders
in the junk code division, and they've cleaned up their act enormously.
I guess it will take quite some time for the anti-MS brigade to drop
their bashing though!!

<snip>

Thanks for the reply.

--
Alan Silver
(anything added below this line is nothing to do with me)
Feb 20 '06 #6
In article <99********************************@4ax.com>, Stephen Poley
<sb******************@xs4all.nl> writes
On 20 Feb 2006 07:45:11 -0800, "Steve Pugh" <st**********@gmail.com>
wrote:
My question is, does the same apply to XHTML 1.0 Transitional? I develop
sites using ASP.NET, which emits valid XHTML 1.0 Transitional, but not
XHTML 1.0 Strict


It should be possible to make .net extrude whatever code you want it
to. It's a fairly crap tool if it doesn't.


According to a colleague I spoke to at lunch today (well, actually he
was doing most of the speaking), "fairly crap" is being kind. Apparently
.net does the typical Microsoft trick of thinking it knows better than
the developer, and spontaneously changes working files into non-working
files. He was an exceedingly unhappy bunny.


In that case, I suggest he learns a bit more about how to use it
properly. The comment you have reported is inaccurate to say the least.
The framework doesn't do anything with your files. If he hasn't written
his files right in the first place, then you can't blame the framework
for not being able to work with them. With extremely few exceptions,
working files will carry on working. I'm assuming he's talking about
upgrading from one version of the framework to another. If he's talking
about going from ASP to ASP.NET, then he would be foolish in the extreme
if he expected them to work. It's a totally different environment and
barely compatible.

I'm not saying ASP.NET isn't without issues, but this simply isn't one
of them. It also depends on what version he's using. Any 1.x version is
asking for trouble. Version 2.0 is a whole new world. It emits valid and
accessible code for one thing!!

--
Alan Silver
(anything added below this line is nothing to do with me)
Feb 20 '06 #7
Alan Silver wrote:
By "client-side" I assume you mean normal XHTML. I can't imagine why you
would be writing XHTML on the server.


You might be writing XHTML and having your CMS output HTML (which is what my
system does - partly to avoid certain problems some browsers have with
perfectly good HTML).

--
David Dorward <http://blog.dorward.me.uk/> <http://dorward.me.uk/>
Home is where the ~/.bashrc is
Feb 20 '06 #8
Alan Silver wrote:
In article <dt*******************@news.demon.co.uk>, David Dorward
<do*****@yahoo.com> writes
Yes ... but client-side XHTML is silly at best[1],


By "client-side" I assume you mean normal XHTML. I can't imagine why you
would be writing XHTML on the server.


There are benefits gained from writing/storing XHTML on the server if
your authoring/publishing environment makes use of XML tools, such as
guaranteeing well-formedness and, if you make use of a validating
parser, validity.

Of course, one could just as easily make use of SGML tools to write HTML
and ensure it's valid, but unfortunately many CMSs (particularly the
popular ones like WordPress, MovableType, etc.) don't make use of either
and there's no benefit gained either way.
--
Lachlan Hunt
http://lachy.id.au/
http://GetFirefox.com/ Rediscover the Web
http://GetThunderbird.com/ Reclaim your Inbox
Feb 21 '06 #9
In article <dt*******************@news.demon.co.uk>, David Dorward
<do*****@yahoo.com> writes
Alan Silver wrote:
By "client-side" I assume you mean normal XHTML. I can't imagine why you
would be writing XHTML on the server.


You might be writing XHTML and having your CMS output HTML (which is what my
system does - partly to avoid certain problems some browsers have with
perfectly good HTML).


Oh, I see. Thanks for the clarification.

--
Alan Silver
(anything added below this line is nothing to do with me)
Feb 21 '06 #10
In article <ku**************@nospamthankyou.spam>, Alan Silver
<al*********@nospam.thanx.invalid> writes
So, if I have a doctype like this...

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

will this give me standards mode?


Can someone please just clarify that this is in fact correct, just to
reassure me!! Thanks

--
Alan Silver
(anything added below this line is nothing to do with me)
Feb 21 '06 #11
On Tue, 21 Feb 2006, Alan Silver wrote:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

will this give me standards mode?


Can someone please just clarify that this is in fact correct, just
to reassure me!! Thanks


Just how hard was it to do a search of the archives for discussions of
quirks v. standards mode, and find references to one or other of
http://hsivonen.iki.fi/doctype/ and
http://gutfeldt.ch/matthias/articles/doctypeswitch.html

Of course the whole concept is bogus; but it's what's happening, so,
bogus or not, we have little choice than to use it.
Feb 21 '06 #12
In article <Pi*******************************@ppepc56.ph.gla. ac.uk>,
Alan J. Flavell <fl*****@physics.gla.ac.uk> writes
On Tue, 21 Feb 2006, Alan Silver wrote:
> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
> "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
>
> will this give me standards mode?
Can someone please just clarify that this is in fact correct, just
to reassure me!! Thanks


Just how hard was it to do a search of the archives for discussions of
quirks v. standards mode, and find references to one or other of
http://hsivonen.iki.fi/doctype/ and
http://gutfeldt.ch/matthias/articles/doctypeswitch.html


It wasn't hard at all. It was a search that gave me this doctype in the
first place. The reason for me asking was that I am only just getting to
grips with this, and I wanted reassurance that I had understood the
issue correctly.

Is that so terrible?

BY the way, in my searching, I found the info I wanted at
http://www.alistapart.com/articles/doctype. I didn't see either of the
pages you linked above, although I'm grateful for the links, especially
the first, as they were informative.
Of course the whole concept is bogus; but it's what's happening, so,
bogus or not, we have little choice than to use it.


Bogus in what way? As I said, I'm no expert on this, so would be
grateful for any extra information you can provide.

--
Alan Silver
(anything added below this line is nothing to do with me)
Feb 21 '06 #13
On Mon, 20 Feb 2006 22:58:13 +0000, Alan Silver
<al*********@nospam.thanx.invalid> wrote:
In article <99********************************@4ax.com>, Stephen Poley
<sb******************@xs4all.nl> writes
On 20 Feb 2006 07:45:11 -0800, "Steve Pugh" <st**********@gmail.com>

It should be possible to make .net extrude whatever code you want it
to. It's a fairly crap tool if it doesn't.
According to a colleague I spoke to at lunch today (well, actually he
was doing most of the speaking), "fairly crap" is being kind. Apparently
.net does the typical Microsoft trick of thinking it knows better than
the developer, and spontaneously changes working files into non-working
files. He was an exceedingly unhappy bunny.


In that case, I suggest he learns a bit more about how to use it
properly. The comment you have reported is inaccurate to say the least.
The framework doesn't do anything with your files. If he hasn't written
his files right in the first place, then you can't blame the framework
for not being able to work with them. With extremely few exceptions,
working files will carry on working.


So there are exceptions then ...
I'm assuming he's talking about
upgrading from one version of the framework to another.
Well, you know what they say about assumptions.
If he's talking
about going from ASP to ASP.NET, then he would be foolish in the extreme
if he expected them to work. It's a totally different environment and
barely compatible.
No. The stuff was written for .NET.
I'm not saying ASP.NET isn't without issues, but this simply isn't one
of them. It also depends on what version he's using. Any 1.x version is
asking for trouble.
That's a pretty sudden bit of backtracking. We didn't go into details -
it may have been 1.x.
Version 2.0 is a whole new world. It emits valid and
accessible code for one thing!!

--
Stephen Poley

http://www.xs4all.nl/~sbpoley/webmatters/
Feb 21 '06 #14
Alan Silver wrote:
Of course the whole concept is bogus; but it's what's happening, so,
bogus or not, we have little choice than to use it.
Bogus in what way?


The Doctype states which language the document is authored in. Browsers look
at this (specifically at the collection of characters that make up Doctype,
not at the language the Doctype claims the document is written in[1]) and
use it to choose between following the specifications (mostly CSS, not even
the spec that the Doctype actually relates to!) as closely as possible and
intentionally getting parts of it wrong.
[1] e.g. A Doctype for HTML 4.01 Transitional may or may not trigger
standards mode depending on the presence or absence of a URL in the
Doctype.
--
David Dorward <http://blog.dorward.me.uk/> <http://dorward.me.uk/>
Home is where the ~/.bashrc is
Feb 21 '06 #15
In article <q4********************************@4ax.com>, Stephen Poley
<sb******************@xs4all.nl> writes
<snip>
With extremely few exceptions,
working files will carry on working.


So there are exceptions then ...


I'm sure there are. I said it that way to cover myself against someone
pointing one out. As far as I have seen, a working file will carry on
working.
I'm assuming he's talking about
upgrading from one version of the framework to another.


Well, you know what they say about assumptions.


True, but if he isn't then I haven't a clue what your comment was
supposed to mean. Maybe there are other circumstances in which working
files can suddenly stop working, but other than an upgrade (which
shouldn't stop anything working), I can't see what.

Given the very vague nature of the description, it was hard todo
anything other than assume ;-)
If he's talking
about going from ASP to ASP.NET, then he would be foolish in the extreme
if he expected them to work. It's a totally different environment and
barely compatible.


No. The stuff was written for .NET.


Well then, he shouldn't be having problems with files stopping working.
Unless he's done something wrong of course, but you don't seem to
consider that a possibility.
I'm not saying ASP.NET isn't without issues, but this simply isn't one
of them. It also depends on what version he's using. Any 1.x version is
asking for trouble.


That's a pretty sudden bit of backtracking. We didn't go into details -
it may have been 1.x.


Why is it a backtrack. As far as I am concerned, 2.0 has been out long
enough for anyone doing serious ASP work to upgrade. AFAIK, there aren't
any upgrade issues, and 2.0 offers so many benefits over 1.x that
there's every reason to move.

Anyway, as this is OT for this group, I suggest we drop the subject. If
your friend is having the kind of problems you describe, I suggest he
hops over to the ASP.NET newsgroups and asks there.

Ta ra

--
Alan Silver
(anything added below this line is nothing to do with me)
Feb 21 '06 #16
David Dorward <do*****@yahoo.com> writes:
Alan Silver wrote:
(Alan Flavell wrote [about doctype sniffing]:)
Of course the whole concept is bogus; but it's what's happening, so,
bogus or not, we have little choice than to use it.

Bogus in what way?


In every way.
The Doctype states which language the document is authored in.


No it does not. It just specifies the document's own, unique formal
grammar (or to say it with /the makers of/, 'The element, entity, and
short reference sets') in its declaration subset and declares the root
element for the following document instance set.

That's one good reason why the whole concept of sniffing for per
definition arbitrary strings is rightout laughable.
--
||| hexadecimal EBB
o-o decimal 3771
--oOo--( )--oOo-- octal 7273
205 goodbye binary 111010111011
Feb 22 '06 #17
VK

Alan Silver wrote:
Bogus in what way? As I said, I'm no expert on this, so would be
grateful for any extra information you can provide.


Unless I'm totally out of the loop here:- "bogus" means that IE doesn't
support XHTML and doesn't plan to do it in the any near future:

<blockquote
cite="http://blogs.msdn.com/ie/archive/2005/07/29/445242.aspx">
- Is there any hope of IE7 supporting the application/xml+xhtml and
application/xml+xslt media types?

- I'd guess XHTML support is very unlikely - it won't affect as many
people as HTML/CSS/DOM/HTTP updates, and it's a bigger job than many
people realise. It's not simply a case of adding a media type to a list
and failing on malformed documents. There are changes to the DOM,
changes to CSS, etc that also have to be added.
</blockquote>

Therefore with XHTML it goes by "unrecognized DTD" as spelled at
<http://msdn.microsoft.com/library/en-us/dnie60/html/cssenhancements.asp>
so it goes into "standard compliant mode" (CSS1Compat) and parse (at
least trying to parse) your document as HTML 4.01 - with unsure
outcome.

In this respect it is irrelevant did you declare XHTML 1.0
Transitional, XHTML 1.0 Strict or FOOBAR 0.1 Beta Loose - it will be
the same behavior.

<!DOCTYPE FOOBAR>
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type"
content="text/html; charset=windows-1251">
</head>

<body onload="alert(document.compatMode)">
<!-- still shows CSS1Compat -->
</body>
</html>

Feb 22 '06 #18
On Wed, 22 Feb 2006, VK wrote:

Alan Silver wrote:


[about DOCTYPE sniffing...]
Bogus in what way? As I said, I'm no expert on this, so would be
grateful for any extra information you can provide.


Unless I'm totally out of the loop here:- "bogus" means that IE
doesn't support XHTML and doesn't plan to do it in the any near
future:


Heavens, no: DOCTYPE sniffing isn't about HTML versus XHTML - it's
about rendering in quirks mode versus standards mode.

At the superficial level, it's bogus to suppose that by inspecting
some details of an author's DOCTYPE, one could deduce whether he wants
his web page to be taken seriously as standard HTML+CSS, or just
treated as an attempt to do visual DTP relying on the (known and
unknown) misbehaviours of old and buggy browsers - nowadays most
particularly MSIE.

It's doubly-bogus that the quirks v. standards heuristic test is done
on the DOCTYPE in the HTML, whereas quirks v. standards has most of
its *effect* on the interpretation of CSS, not of HTML.

It's kind of sad that when MSIE was originally introduced, it
attempted to emulate the known bugs of the then-available Netscape
version, whereas nowadays the Mozilla folks have wasted a substantial
amount of time and effort on emulating the known bugs of later
versions of MSIE. A pity they couldn't just have concentrated on
implementing to specifications, considering all the things that are
in the specifications but still waiting to be implemented.

At a deeper level, the supposition that the DOCTYPE even declares
which "version" of HTML the author thought they were using, is
fundamentally flawed. It doesn't matter, and 99.9% of readers won't
want to know or care, but the matter is examined in depth (and this is
an answer to David Dorward's apparent misconception about this
underlying principle) in an article linked from the already-cited
http://hsivonen.iki.fi/doctype/ , namely
http://groups.google.com/group/comp....e53dee2c152a81

No offence meant to David - it's a very popularly held misconception,
indeed in practical terms it really doesn't have any impact on us as
web authors. But nevertheless, as it says there (written in 1998,
in an SGML context, of course):

___
/
Have I made my point? DOCTYPE declarations tell you nothing about the
class of documents of which a document is a member. Nothing.
[...]
This means that there is a BIG PROBLEM: for the last 10 years,
something we thought we were doing turns out to not be that at all.
We have all been living a lie for the last 12 years.
\___
And he goes on to discuss Architectural Forms - which XML tossed
aside, and later re-invented in a different way. But I digress.
Feb 23 '06 #19
VK
Alan J. Flavell wrote:
DOCTYPE sniffing isn't about HTML versus XHTML - it's
about rendering in quirks mode versus standards mode.
Right.

An important notice though: DOCTYPE by itself is *nothing* whatsoever:
it's just a text string placed before <html> tag. Any consequences it
may lead to are up to a particular UA. It may go into standard mode or
not, parse all tags through the linked DTD or screw on it, render
non-declared tags or not.
Therefore if say Firefox renders <iframe> in HTML Strict rather than
treat it as unrecognized tag (because HTML Strict doesn't have it in
DTD) - it is not a DOCTYPE "idea" failure, but the common sense and
desire to survive which will always prevail over any written standards.
At the superficial level, it's bogus to suppose that by inspecting
some details of an author's DOCTYPE
DOCTYPE is merely a "declaration of intentions". One can declare HTML
Strict and use <iframe>, or use textarea wrap attribute which is
missing by mistake in all DTD's. W3C's cops will not come to your house
:-)

Besides "declaration of intentions" (and minor attribute / CSS rules
parsing issues) the main purpose of DOCTYPE is to switch IE from IE Box
Model to W3C Box Model (if you need to).
In this concern indeed it is irrelevant what you place atop as long as
it is not
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
(Transitional without linked DTD)

Except that you can use nearly anything to switch IE into CSS1Compat
without a damn bit of difference:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Strict//EN"
"http://www.w3.org/TR/html401/strict.dtd">

goes as well and with absolutely the same results (CSS1Compat mode) as:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

or:

<!DOCTYPE FOOBAR "Microsoft Must Die! :-D">
It's doubly-bogus that the quirks v. standards heuristic test is done
on the DOCTYPE in the HTML, whereas quirks v. standards has most of
its *effect* on the interpretation of CSS, not of HTML.
compatibility (quirks) v. standard switch happens based on the presence
of DTD of certain kind (see above). As at leads to Box Model change in
IE, CSS based layout == page appearance depends on it for 60% - 90% of
your visitors. No one can disregard that.
At a deeper level, the supposition that the DOCTYPE even declares
which "version" of HTML the author thought they were using, is
fundamentally flawed.
It did not!
Until IE 6.0 DTD at the top of page was an equivalent of supporter sign
on your jaket during the election campain. It did not have any real
technical value - as it doesn't now - but it was a public pressure of
some kind. Without it even CSS1Compat mode would never be available.
Have I made my point? DOCTYPE declarations tell you nothing about the
class of documents of which a document is a member. Nothing.


But it may affect significally on the page appearance for 60%-90% of
your visitors.

Feb 23 '06 #20
On Thu, 23 Feb 2006, VK wrote:
Alan J. Flavell wrote:
DOCTYPE sniffing isn't about HTML versus XHTML - it's
about rendering in quirks mode versus standards mode.
Right.

An important notice though: DOCTYPE by itself is *nothing*
whatsoever:


There's the difference between what it *is*, and what it *gets used
for*.

What it *is*, is defined by SGML, in theory. But in practical terms
it gets used for something else altogether. And that's why DOCTYPE
sniffing is being characterised as "bogus" - no matter that we need to
use it in practice, since this bogosity seems to have been widely
adopted.
At a deeper level, the supposition that the DOCTYPE even declares
which "version" of HTML the author thought they were using, is
fundamentally flawed.


It did not!


(Does not parse.)
Until IE 6.0 DTD at the top of page was an equivalent of supporter
sign on your jaket during the election campain.
Again you're confusing the question of what it /is/, with what it gets
(or got) used for.
But it may affect significally on the page appearance for 60%-90% of
your visitors.


Visual appearance is no concern of SGML :-}

As I said before - this *SGML* feature is being (mis)used in *HTML* in
order to influence a browser's interpretation of *CSS*. That's at
least *double* bogosity, if not multiple. Still, we have no
alternative in practice than to follow it, no matter how bogus we may
consider it to be.
Feb 24 '06 #21

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

35
by: The Bicycling Guitarist | last post by:
My web site has not been spidered by Googlebot since April 2003. The site in question is at www.TheBicyclingGuitarist.net/ I received much help from this NG and the stylesheets NG when updating the...
16
by: Alan Silver | last post by:
Hello, I have read about the problems that IE has when using a doctype of HTML 4.01 Transitional. I was advised to use Strict wherever possible. My question is, does the same apply to XHTML...
4
by: timothy.pollard | last post by:
Hi all A few weeks ago a nice man called Evertjan helped me create a form validation system that took a table of four columns of checkboxes and: - allowed only one checkbox in each row to be...
6
by: Rolf Welskes | last post by:
Hello, if I have for example: <table style="width: 100%; height: 100%;" border="1"> <tr> <td style="width: 100px">k </td> <td style="width: 100px">k </td> </tr>
2
by: Radu | last post by:
Hi. I have been working at home on a web project (VSNET 2005 SP1). Now I have brought the project at work, and I suddenly have plenty of warnings like: Validation (XHTML 1.0 Transitional) -...
17
by: seajay | last post by:
Hello, I noticed something strange when I was composing a XHTML document with CSS The following DOCTYPE causes the page to display differently on Fireflox 1.0.6 and Internet Explorer 6...
14
by: tader | last post by:
so i got script like that <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> <title>Drag and Drop</title> <style> #slater { display:block;
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.