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

Re: attributes with missing values yield different errors?

From: Liam Quinn <liam@htmlhelp.com>
Date: Thu, 4 Apr 2002 16:12:28 -0500 (EST)
To: Jim Correia <correia@barebones.com>
cc: W3C Validator <www-validator@w3.org>
Message-ID: <Pine.LNX.4.33L2.0204041609540.32497-100000@localhost.localdomain>
On Thu, 4 Apr 2002, Jim Correia wrote:

> Assuming a full HTML 4.01 document a table element is written as so
>
> <table border>
>
> The validator doesn't complain.
>
> The attributes for table are declared as
>
> <!ATTLIST TABLE                        -- table element --
>    %attrs;                              -- %coreattrs, %i18n, %events --
>    summary     %Text;         #IMPLIED  -- purpose/structure for speech
> output--
>    width       %Length;       #IMPLIED  -- table width --
>    border      %Pixels;       #IMPLIED  -- controls frame width around
> table --
>    frame       %TFrame;       #IMPLIED  -- which parts of frame to
> render --
>    rules       %TRules;       #IMPLIED  -- rulings between rows and
> cols --
>    cellspacing %Length;       #IMPLIED  -- spacing between cells --
>    cellpadding %Length;       #IMPLIED  -- spacing within cells --
>    align       %TAlign;       #IMPLIED  -- table position relative to
> window --
>    bgcolor     %Color;        #IMPLIED  -- background color for cells --
>    %reserved;                           -- reserved for possible future
> use --
>    datapagesize CDATA         #IMPLIED  -- reserved for possible future
> use --
>    >
>
> This seems reasonable, since HTML supports attribute minimization, so
> this should be expanded to <table border=border> conceptually, and since
> %pixels is ultimately defined as CDATA, the validator lets it by. Is
> this the correct analysis?

No.  <table border> is actually equivalent to <table frame=border>.  Note
this comment from the HTML 4.01 DTD in describing the values for the
"frame" attribute:

 The value "border" is included for backwards compatibility with
 <TABLE BORDER> which yields frame=border and border=implied
 For <TABLE BORDER=1> you get border=1 and frame=implied. In this
 case, it is appropriate to treat this as frame=border for backwards
 compatibility with deployed browsers.

-- 
Liam Quinn
Received on Thursday, 4 April 2002 16:12:30 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 25 April 2012 12:14:03 GMT