W3C home > Mailing lists > Public > www-validator@w3.org > April 2004

Re: Tips for deprecated tags and attributes

From: Jukka K. Korpela <jkorpela@cs.tut.fi>
Date: Tue, 20 Apr 2004 16:20:44 +0300 (EEST)
To: www-validator@w3.org
Message-ID: <Pine.GSO.4.58.0404201559500.2702@korppi.cs.tut.fi>

On Tue, 20 Apr 2004, Frank Ellermann wrote:

> Another idea would be a "visible with legacy browsers" DTD
> designed for new pages trying to be compatible with legacy
> browsers.  This DTD wouldn't allow size= / face= in <font>,
> but require name= corresponding to id= in anchors.

Such a requirement is somewhat questionable, since it generally requires
considerable modification of nice markup to make it compatible with
Netscape 4 class browsers that don't understand id="..." destinations.
(That would mean turning <h2 id="foo">xxx</h2> into
<h2><a id="foo" name="foo">xxx</a></h2>.)

I mention this in this context just to point out that such issues are
controversial, and there's no widely acceptable definition of what
should be allowed in "legacy DTD". Naturally you can write your own DTD
that allows exactly what you wish to allow.

If I had a little more spare time I would write a utility that lets you
specify "features" to be included or excluded, via a simple form
interface, and generates a DTD corresponding to it. Maybe someone else
wishes to do that? Then there would be an answer to all requests for
various "legacy DTDs". And it could also allow some common extensions like
<embed> and <nobr>, if desired. Well, it could allow _any_ element to be
disallowed, just in case a person or organization wishes to refrain from
using some elements and have checks against accidental use of them.
(This would actually be one of the most useful ways of using a
markup validator.)

> It could eliminate anything which is not essential for new
> and simple pages, e.g. only external CSS as in XHTML basic,
> no more <center>, but <div align="center"> is still okay,
> no <del> without <s>, and some other "XHTML strict" quirks.

I don't see why <div align="center"> would be any better than <center>, or
why <del> should be used together with <s>, but as regards to validation,
the first principle is easily implementable, whereas the latter is a bit
more difficult - unless you wish to require exactly that <del> is only
allowed with <s> (or <strike>?) as its only content, which is easily
describable in a DTD.

> For me "transitional" is far too "transitional" and "strict"
> is far too "strict".  I miss something like "simple", and
> it's not the same as "basic".

There's a good general point here of course. Authors may wish to avoid
certain transitional features and keep using others, maybe changing the
division by time, i.e. by moving elements and attributes away from the
allowed repertoire.

But this is relatively independent of a particular validator. DTDs could
be used in any suitable context. What the validator development needs to
take note of is the principle that a clear distinction should be drawn
between validation and all other activities that checking utility might be
involved in. In particular, a validator should simply tell whether a
document is valid or not, and report markup errors if not, and _then_
maybe start talking about the weather, or what clothes we should wear, or
what HTML design principles we should apply, or whether some heuristics
has suggested that the document might syntactically comply with the rules
of an SGML application called "HTML". The reason is that documents using
customized DTDs can be valid, but not conforming documents (according to
the odd rules of HTML that require specific doctype declarations to be
used), but it would be rather misleading to say that a document is not
valid HTML 4.01, when it (for example) actually complies with HTML 4.01
Strict rules _and_ some additional rules that prohibit presentational
features allowed in Struct, _except_ the very rule that requires the use
of a specific doctype declaration.

Jukka "Yucca" Korpela, http://www.cs.tut.fi/~jkorpela/
Received on Tuesday, 20 April 2004 09:21:01 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 1 March 2016 14:17:40 UTC