This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 8590 - can empty string be a valid keyword?
Summary: can empty string be a valid keyword?
Status: RESOLVED WONTFIX
Alias: None
Product: HTML WG
Classification: Unclassified
Component: pre-LC1 HTML5 spec (editor: Ian Hickson) (show other bugs)
Version: unspecified
Hardware: PC Windows NT
: P2 normal
Target Milestone: ---
Assignee: Ian 'Hixie' Hickson
QA Contact: HTML WG Bugzilla archive list
URL: http://dev.w3.org/html5/spec/Overview...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-01-03 18:56 UTC by Don Brutzman
Modified: 2010-10-04 14:31 UTC (History)
5 users (show)

See Also:


Attachments

Description Don Brutzman 2010-01-03 18:56:50 UTC
2.4.3 Keywords and enumerated attributes

states

"Note:  The empty string can be a valid keyword."

This statement doesn't make much sense since an
empty string is not a word per se, and so it can't be
a keyword either.  Further, an empty string isn't
allowed as an enumeration value in XML Schema
enumeration lists, so it is not clear how to
represent it in such a context.

Presumably an empty string might be a way of changing
the value of a nillable attribute which otherwise has
an originally defined default value.

Perhaps better phrasing is

"Note:  The empty string can be a valid attribute value
for determining state in this context."
Comment 1 Ian 'Hixie' Hickson 2010-01-07 06:50:40 UTC
EDITOR'S RESPONSE: This is an Editor's Response to your comment. If you are satisfied with this response, please change the state of this bug to CLOSED. If you have additional information and would like the editor to reconsider, please reopen this bug. If you would like to escalate the issue to the full HTML Working Group, please add the TrackerRequest keyword to this bug, and suggest title and text for the tracker issue; or you may create a tracker issue yourself, if you are able to do so. For more details, see this document:
   http://dev.w3.org/html5/decision-policy/decision-policy.html

Status: Rejected
Change Description: no spec change
Rationale: I don't see why a keyword has to be a word. It's just a string, and the empty string is a valid string.
Comment 2 Don Brutzman 2010-01-26 07:08:40 UTC
An empty string is a valid value, but it is not a keyword per se.

Suggested change:

"Note:  The empty string can be a valid value when no keyword is explicitly defined."
Comment 3 Ian 'Hixie' Hickson 2010-02-14 02:46:55 UTC
(In reply to comment #2)
> An empty string is a valid value, but it is not a keyword per se.

That depends on how you define keyword. I don't see why the empty string can't be defined as a keyword.


> Suggested change:
> 
> "Note:  The empty string can be a valid value when no keyword is explicitly
> defined."

That wouldn't be enough  you'd have to go through the entire spec changing "keyword" to "value", which would make the whole spec much less readable since the word "value" is used all over the place. In particular, it would be very confusing because attributes have values whether they're valid values or not, so we'd have to define some strings as being valid values and have sentences talking about whether a value is a valid value that maps to a state or not, and so on. I tried making this edit but had to abandon it because it really hurt readability.

In practice I really don't buy that this is a particularly big problem: there are only two attributes (contenteditable and spellcheck) that take the empty string as a keyword; together with the note in question, that means only three places in the whole spec mention this.

EDITOR'S RESPONSE: This is an Editor's Response to your comment. If you are satisfied with this response, please change the state of this bug to CLOSED. If you have additional information and would like the editor to reconsider, please reopen this bug. If you would like to escalate the issue to the full HTML Working Group, please add the TrackerRequest keyword to this bug, and suggest title and text for the tracker issue; or you may create a tracker issue yourself, if you are able to do so. For more details, see this document:
   http://dev.w3.org/html5/decision-policy/decision-policy.html

Status: Rejected
Change Description: no spec change
Rationale: While it might be unusual for the empty string to be considered a keyword, it really is preferable to the alternative.