Click here to get back home

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

 HomeNewsGroups | Search | About
 comp.infosystems.www.authoring.html    Post an article   get this group's latest topics as an RSS feed add this group's latest topics to your My MSN content add this group's latest topics to your My Yahoo content
Subject Author Date
Does IE have the same problems with XHTML 1.0 Transitional as it does with HTML Transitional? Alan Silver 02-20-2006
Posted by Alan Silver on February 20, 2006, 9:39 am
Please log in for more thread options


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)

Posted by Steve Pugh on February 20, 2006, 10:45 am
Please log in for more thread options


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


Posted by Alan Silver on February 20, 2006, 11:13 am
Please log in for more thread options


>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)

Posted by David Dorward on February 20, 2006, 2:06 pm
Please log in for more thread options


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

Posted by Alan Silver on February 20, 2006, 5:54 pm
Please log in for more thread options


>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)

Similar ThreadsPosted
HTML 4.01 strict / transitional vs. XHTML 1.0 September 18, 2005, 3:10 pm
Validation: XHTML Transitional vs. HTLM 4.01 Strict July 23, 2004, 6:10 pm
Strict vs Transitional XHTML doctype and images January 30, 2007, 5:32 pm
Reasons to use HTML 4.01 Transitional October 30, 2006, 11:30 am
HTML 4.01 Transitional versus Frameset September 3, 2006, 11:22 pm
EMBED-command - HTML 4.01 Transitional alternative? July 17, 2004, 7:42 pm
Differences between HTML 4.01 Strict and HTML 4.01 Transitional? May 31, 2005, 7:13 pm
Transitional//EN August 1, 2005, 8:28 am
XHTML Problems July 3, 2005, 8:19 am
Code added to my XHTML source files giving problems November 18, 2005, 6:56 pm

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap