Hello everyone,
My apologies if this has been discussed before, but I just noticed that Wikipedia pages carry a doctype declaration of <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
Since this does not include the URL to a full DTD, the curse of doctype sniffing sees most browsers render the page in "Quirks" or "Bugwards compatible" mode rather than "strict" mode. In the interests of making wikipedia accessible, I think it would be better to force strict mode - then editors would be more likely to notice markup errors which affect the rendering on browsers which do not correct for bad markup.
Since this does not include the URL to a full DTD, the curse of doctype sniffing sees most browsers render the page in "Quirks" or "Bugwards compatible" mode rather than "strict" mode. In the interests of making wikipedia accessible, I think it would be better to force strict mode - then editors would be more likely to notice markup errors which affect the rendering on browsers which do not correct for bad markup.
Why don't we just let the people using such browsers send us bug reports? If it ain't broke, don't fix it.
Regards,
Erik
On Mon, Dec 30, 2002 at 10:12:00PM +0100, Erik Moeller wrote:
Since this does not include the URL to a full DTD, the curse of doctype sniffing sees most browsers render the page in "Quirks" or "Bugwards compatible" mode rather than "strict" mode. In the interests of making wikipedia accessible, I think it would be better to force strict mode - then editors would be more likely to notice markup errors which affect the rendering on browsers which do not correct for bad markup.
Why don't we just let the people using such browsers send us bug reports? If it ain't broke, don't fix it.
Because it's better if we just do The Right Thing from the beginning.
Jonathan
(Richard, you may be interested in the wikitech-l development list; see http://www.wikipedia.org/mailman/listinfo/wikitech-l )
On lun, 2002-12-30 at 11:02, Richard Grevers wrote:
My apologies if this has been discussed before, but I just noticed that Wikipedia pages carry a doctype declaration of
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
Since this does not include the URL to a full DTD, the curse of doctype sniffing sees most browsers render the page in "Quirks" or "Bugwards compatible" mode rather than "strict" mode.
Yes, this is intentional.
In the interests of making wikipedia accessible, I think it would be better to force strict mode - then editors would be more likely to notice markup errors which affect the rendering on browsers which do not correct for bad markup.
We don't use the strict DTD (or, better yet, XHTML) because our hacked-together wikicode->HTML parser currently can't guarantee that it will generate well-formed output (particularly if there is raw HTML in the page, which is munged a bit but not always correctly). If well-behaved web browsers reject the page or massively break page rendering due to a minor error, it's going to be mighty difficult for editors using them to click 'edit' and try to work around the problem!
(On a similar note, nested HTML tables without closing </td> and </tr> tags, while acceptable under HTML 4 standards, break Netscape 4.x, even to the point of *crashing* it outright. This cropped up a while ago on some of the Canadian provinces articles; the person who noticed the problem couldn't edit the pages to look for the problem, since the browser crashed before an edit link was made available. Really strict DTD parsing isn't quite as bad -- it should at least tell you the problem! -- but makes it hard to continue browsing.)
Volunteers for a new XHTML-safe parser are welcome...
-- brion vibber (brion @ pobox.com)
Brion Vibber wrote:
Volunteers for a new XHTML-safe parser are welcome...
You might want to check out the markup parser we use on Unreal Wiki. My co-host there Mychaeel wrote it as a replacement for UseModWiki's built-in parser. It's a separate perl script.
http://wiki.beyondunreal.com/wiki/Wookee -- general description & test area
It's OO and extendable. I expect it can be taught to chomp up unclosed <TD> as a piece of wiki markup and spit out clean <TD></TD>. But maybe we should reopen the debate on implementing table markup?
-- tarquin
On 30 Dec 2002 13:55:35 -0800, Brion Vibber wrote:
(Richard, you may be interested in the wikitech-l development list; see http://www.wikipedia.org/mailman/listinfo/wikitech-l )
On lun, 2002-12-30 at 11:02, Richard Grevers wrote:
My apologies if this has been discussed before, but I just noticed that Wikipedia pages carry a doctype declaration of
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
Since this does not include the URL to a full DTD, the curse of doctype sniffing sees most browsers render the page in "Quirks" or "Bugwards compatible" mode rather than "strict" mode.
Yes, this is intentional.
We don't use the strict DTD (or, better yet, XHTML) because our hacked-together wikicode->HTML parser currently can't guarantee that it will generate well-formed output (particularly if there is raw HTML in the page, which is munged a bit but not always correctly). If well-behaved web browsers reject the page or massively break page rendering due to a minor error, it's going to be mighty difficult for editors using them to click 'edit' and try to work around the problem!
Sorry, a sloppy use of "Strict". I agree that using a strict DTD where the code is 1) machine generated 2) able to be input directly by editors is asking for trouble. But allowing browsers with two rendering modes to render the more standards compliant one by using the transitional DTD with URL ( <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html40/loose.dtd"> ) would be preferable to quirks mode. At worst, it would cause markup such as <SMALL><Table> to not render as small.
Perhaps it would be a good idea for the preview page to contain a link (targeted to a new window) to submit the page to the validator. (Or to generate the page as it would be if saved and submit that to the validator).
-- Why is it that most nudists are people you don't want to see naked?
wikipedia-l@lists.wikimedia.org