W3C home > Mailing lists > Public > www-html@w3.org > March 2003

Re: Against 'start' and 'value' attributes

From: William F Hammond <hammond@csc.albany.edu>
Date: 12 Mar 2003 08:30:28 -0500
To: "www-html@w3.org" <www-html@w3.org>
Message-ID: <i78yvkzp8r.fsf@hilbert.math.albany.edu>

glazman@netscape.com (Daniel Glazman) writes:

> Ian Hickson wrote:
> 
> >>An attribute is not content.
> > This is fundamentally untrue.
> > An attribute is just syntactic sugar for an unordered child element
> > containing only a text node.

In the wide world of document types, attributes are semantic in nature
rather than presentational.  It is more or less true, however, that
attributes in HTML up through 4.01 can be viewed as somewhat
presentational, and, in particular, the "class" attribute of an
element points to a presentation class.

> An attribute is a decoration on the tree and not real content. There are
> several arguments known since the release of SGML, and the DOM as it is

Perhaps you mean the 1998 release of XML, not the 1986 ISO standard
defining SGML.

> today is another good bit of an argument.

> 2. the DOM is not attribute-oriented. To look for all elements carrying
>     a given attribute, you have to traverse the elements' tree and then
>     check for attribute presence for every element.

Quite logical since an attribute belongs to the element to which it's
attached.

> 4. unless you work in a source environment, and unless you can use a
>     style language having attribute selectors, attributes are not meant
>     to be presented to the reader and have no influence on the rendering.

In document type design the question of whether features belong in an
element or in the attribute of an element is a question about the
design of a processing template.  In many frameworks it is the
difference between de-referencing a pointer (looking at an attribute
value) and calling a function (digesting an element).

> 6. attributes usually imply no toplevel semantic change. A list is a
>     list.
>     A list with a start attribute remains a list. Even if you change the
>     current list model to add an ordered="yes|no" attribute, that's still
>     a list. The content is NOT changed. It's more or less decorated,
>     that's all.

For lists it is a semantic question whether a processor must preserve
the order of its items.  It is also a semantic question whether repeated
identical items may be eliminated beyond the first.  For many document
types item numbers are an essential part of content if only because it
is important that the numbering be invariant across translations to
various output formats.

                                    -- Bill
Received on Wednesday, 12 March 2003 08:30:30 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 27 March 2012 18:15:54 GMT