W3C home > Mailing lists > Public > public-html@w3.org > June 2007

Re: What is a "state"?

From: Henrik Dvergsdal <henrik.dvergsdal@hibo.no>
Date: Wed, 13 Jun 2007 01:45:09 +0200
Message-Id: <693EEA2F-41A0-4EF4-8F9E-6C21B8FC5266@hibo.no>
To: HTML WG <public-html@w3.org>

On 12 Jun 2007, at 22:51, Ian Hickson wrote:

> On Tue, 12 Jun 2007, Henrik Dvergsdal wrote:
>> Section 3.2.7 says that keywords of enumerated attributes "are each
>> defined to map to a particular state". What does the term "state"
>> signify in this case? Is it just a named set of keyword values, or is
>> this a more comprehensive concept?
> http://www.whatwg.org/specs/web-apps/current-work/#enumerated

Since you're answering with a link to the section I was referring to,  
I assume there is nothing more to a "state" than is described there.  
That's ok. I just need to ask because in my experience things are not  
allways that simple.

Formally then, an enumerated attribute is said to be in a particular  
"state" when its value is a member of a particular set of strings or,  
possibly, when it is not set.

There is a little problem, however: I think its misleading to  
describe the invalid/missing value states as "defaults", as these  
don't specify default values in the usual sense, but rather  
particular states corresponding to particular situations, just like  
any other state:

The attribute is set to value which is a member of a set of illegal  
values => illegal value state

The attribute is not set => missing value state

For instance, that an attribute has the true state as a missing value  
state, does not mean it defaults to "true".

Received on Tuesday, 12 June 2007 23:45:42 UTC

This archive was generated by hypermail 2.3.1 : Thursday, 29 October 2015 10:15:22 UTC