W3C home > Mailing lists > Public > w3c-wai-ig@w3.org > April to June 2003

Re: Web site accessibility-layers

From: David Woolley <david@djwhome.demon.co.uk>
Date: Thu, 17 Apr 2003 21:51:51 +0100 (BST)
Message-Id: <200304172051.h3HKpps09222@djwhome.demon.co.uk>
To: w3c-wai-ig@w3.org

> attributes. It becomes readily apparent when you try to validate an 
> XHTML Transitional file with an XHTML Strict DTD.

You have been able to do the same with HTML 4.01 Strict for the last 5
years.  XHTML 1.0 is essentially a rewrite of the grammars of HTML
4.01, both Transitional, and Strict, within the constraints of XML.
That means that various content model rules can no longer be enforced,
and means that the browser cannot infer tags, both opening and closing
(note that HTML 4.01 with omitted tags is just as structured as XHTML
as the location of the missing tags is precisely defined).  At best it
makes one more aware that elements are strictly nested and where they end.

However, if you serve XHTML 1.0 as text/html to IE, it will accept it
according to its HTML error recovery rules, so you will not learn good
structure as the  browser will accept broken XHTML, in the same way as
it accepts broken HTML.

It shouldn't take very long to create a variant HTML 4.01 DTD with
all the "O O" and "- O"s replaced by "- -"s and therefore have HTML
with no optional tags, if you want to validate for that case.  On
the other hand, you can just run the document through sgmlnorm, to
put in all the implied tags.

> Do you have examples of this? One thing I've noticed is that older 
> browsers will break if you don't include a space before the closing 
> slash, but given the space (and the text/html content type), I've never 
> had a problem.

Newer browsers always break if you include the closing /, as the SGML
definition of HTML invokes a behaviour in which <em/Emphasized Text/
is valid markup.  Whilst I may have been overstating things slightly,
any browser based on an SGML engine and using the published HTML 4.01
DTDs will misparse any non-trivial XHTML 1.0 document.

Moreover, to reap the full benefits of XHTML you have to start using
namespaces, which means going to at least HTML 1.1.

> An mime type example for Patrick: I currently serve my site as valid 
> XHTML 1.1 but with the incorrect mime type of "text/html" for 

This is a SHOULD NOT in the rules for using Content Types
for XHTML.  Using text/html for XHTML 1.0 is a MAY.  See
<http://www.w3.org/TR/xhtml-media-types/>.
Received on Friday, 18 April 2003 02:50:10 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 19 July 2011 18:14:09 GMT