RE: DTD & Lang attribute (Checkpoint 3.2 & 4.3)

From what I understand the parser in the browser will look for the DTD on
the first line, or the first entry.  If it does not find it there it will
probably ignore all efforts to find a DTD and will not render it according
to any DTD (just mongrel HTML).   But run it past the W3C validator and see
if it finds the declaration.

This is how most browsers have been working until now, they do not try to
render to a DTD because there is so much undeclared and broken HTML out
there they have to spend all their time trying to make sense of the HTML
soup.  This is infact great programming, and we should appreciate the effort
that the programmers actually put in to try to make sense out of all the
different forms of HTML out there, and not have so many broken pages.  Most
of the pre V6 browsers ignored rendering content to a declared DTD.

This is not the case with the recent browsers; MSIE6, Mozilla , Netscape 7
and Opera 6 (and probably earlier versions of Opera).  All of them look for
the DTD and do their best to render the document according to that DTD.
This should aid the browser in rendering valid correctly declared HTML much
faster and more accurately.

<!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" lang="en" dir="ltr">


You might not be able to fix this in the Notes or the CMS, but if the
organisation you are working with has a good web programmer it is not too
difficult to get them to write scripts to parse the whole site and fix this.
It's not so hard, easy for a decent programmer.  Once they have done that,
if you can point out to them what needs to be changed they could do it, as
long as this anomaly has a consistency about it that can easily be
identified and corrected.

Well, you would also have to get the programmer to strip this out of HEAD.
<!--alang="en"
TIDY now comes in many forms, C, Perl, Java, Python, on all platforms, so a
good programmer should be able to use this library to reformat the generated
templates as close to valid as possible.

I'm afraid Notes is an accessibility hell, but there are probably others on
this list who have found ways to work with it.

Have fun
Geoff

-----Original Message-----
From: w3c-wai-ig-request@w3.org [mailto:w3c-wai-ig-request@w3.org]On Behalf
Of gian@stanleymilford.com.au
Sent: Monday, 9 September 2002 3:29 PM
To: w3c-wai-ig@w3.org
Subject: DTD & Lang attribute (Checkpoint 3.2 & 4.3)

Hi,

I have a question - and I apologise if the answer is obvious, but I was
never a programmer so I don't know.

From what I understand (please correct me if I'm wrong) the DTD and HTML
Lang attribute are used by browsers/ATs to determine the code and
language used in order to best represent a site.  My question is this:
Can these browsers/ATs still read (and interpret) the DTD and HTML Lang
attribute if it is not at the very beginning of the document? for
example:

<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html;
charset=US-ASCII">
<!--alang="en"</HEAD>
<BODY TEXT="000000" BGCOLOR="FFFFFF">
<!-- -->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"
http://www.w3.org/TR/REC-html40/loose.dtd>
<html lang="en">
<head>
<title>Amputations</title><meta http-equiv="content-Type"
content="text/html; CHARSET="iso-8859-1">
...

This is a Lotus Notes problem - this Content Management System
automatically generates HTML code from a word processing type
environment.  The first five lines are automatically generated by Notes
and cannot be tinkered with in any way (and if they can I would be more
than happy to admit my error and learn how!)

Cheers,
Gian

Gian Sampson-Wild
Accessibility Specialist

Received on Friday, 20 September 2002 23:12:38 UTC