Re: What is a "state"?

On Wed, 13 Jun 2007, Henrik Dvergsdal wrote:
> 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

Oops, sorry, I didn't recognise the section number. (I edit the file 
without looking at section numbers.)


> I assume there is nothing more to a "state" than is described there. 

Correct.


> 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.

Right.


> 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".

What do you understand by "default" then? To me that's exactly what it 
means...

-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'

Received on Tuesday, 12 June 2007 23:49:35 UTC