[whatwg] WF2 part 1-3

H?kon Wium Lie wrote:
>
>  > with the time zone set to UTC
> 
> I see the need for a UTC-based value, but expect the "local" variety
> to be more used. How about calling them "datetime" and "datetime-UTC"?

datetime-global, perhaps?

>  > This type is used most frequently for dates in European industry.
> 
> editorial: "European industry" -> "Europe". 

Don't most people in Europe use the month+day system? I've never
heard anyone say, "I'm going home in week 35," but plenty of people
say, "I'm going home in August."

> BTW, my emacs call week numbers "ISO date".

I don't think we want to go there...
(W3C, among others, refers to CCYY-MM-DD as an ISO date.)

>  > A field with a max less than its min can never be satisfied and
>  > thus must block a form from being submitted. This does not make the
>  > document non-conformant.
> 
> Why not?

You could, perhaps, be setting those values through a script, in which
case you might pass through a phase in which max is less than min.
Should the document all-of-a-sudden be non-conformant just because the
math isn't quite correct? It's kinda like writing a function with an
unconditional return in the middle of it; the code is still valid C.

>  > For the control to be valid, the control's value must be an
>  > integral number of steps from the min value, or, if there is no min
>  > attribute, the max value, or if there is neither attribute, from
>  > zero.
> 
> I may be confused by some key terms: valid vs. conformant vs.
> successful. May I suggest a short definition up front somewhere?

I've told Hixie that we need a short introduction to the general idea
of validation in the "new form controls" section.

>  > For the following control, the allowed values are fifteen seconds
>  > and two tenths of a second past the minute, any minute of the day,
>  > i.e. 00:00:15.2, 00:01:15.2, 00:02:15.2 ... 23:59:15.2:
>  >
>  > <input type="time" min="00:00:15.20" name="t">
> 
> Really? You are saying that each value fragment (hour, minute, second,
> second fragment) is evaluated independently? Wouldn't it be more
> useful to consider the value as one where 'min="00:00:15.20"' means
 > [that all times after 00:00:15.20 are valid]?

I agree with this.

>  > When a control has a list attribute, the list of author-specified
>  > autocompletion values shall be given by the list of elements that
>  > would be found by first calling getElementById() ...
> 
> This is the start of a difficult description. Why not just say that 
> 
>   "The value of the list attribute is the ID of a datalist element which
>   contains a list of author-specified autocompletion values".
> 
> If this is too simple and the complex description is necessary, I
> suggest softening it by stating that the list attribute "points to" a
> list of values, rather than "specify a list of values"

The complex description is necessary, but may not need to be quite so
algorithmic.

   The list attribute of a form control can be used to specify the ID of a
   datalist element that contains a list of author-specified autocompletion
   values. If the attribute is present and gives the ID of an (X)HTML datalist
   element in the document, then the UA must compile the autocompletion list
   for the form control from all of the datalist's non-disabled descendant
   (X)HTML option elements, using either the value of each option's 'value'
   attribute (if present) or, (if not present) the concatenation of its textual
   contents as an autocompletion value. If, however, the autocompletion value
   is the empty string or is not a valid value for the control's type, then
   that value must instead be ignored. The UA may use an option's label
   attribute to annotate the corresponding autocompletion value in its
   interface.

   [Insert any error-handling confusion here.]

There's a lot of complex and twisty text in the spec to get around the namespace
juggling. I think it should all be defined (and thereby confined) in a section
at the beginning so it doesn't convolute already complex sentences throughout
the spec. Something like

   In this specification, an (X)HTML element is one which is
     - a regular element in an HTML document
     - an element in the XHTML namespace (http...)
   An (X)HTML attribute is one which is
     - a regular attribute in an HTML document
     - a local attribute of an element in the XHTML namespace (http...)
     - an attribute in the XHTML namespace on an XML element not in the
       XHTML namespace

>  > User agents may use this list to suggest to users the relevant
>  > parts of the document with which the user should interact to change
>  > the value.
> 
> How do you envision the suggestion to appear? Semantic relationships
> are useful for many purposes, but the poor programmer left to
> implement the specification needs a few suggestions. 

Using Hixie's proposed combinator:

   output[for]:hover /for/ *,
   output[for]:focus /for/ * {
     outline: invert dashed;
   }

CSS Selectors v. 3.5? :)

>  > The min and max attributes apply to file upload controls and
>  > specify (as positive integers) how many files must be attached for
>  > the control to be valid.
> 
> Did you mean "successful" instead of "valid"? 

Valid is the right term here. A field is valid if the value fits the
constraints given by min/max/step/pattern/type/etc. It is successful
if it fits the requirements for submission:
   http://www.whatwg.org/specs/web-forms/current-work/#successful

>  > UA implementors should divine appropriate behaviour by reverse
>  > engineering existing products and attempting to emulate their
>  > behaviour.
> 
> Strike divine. Remember, browsers are monolithic dinosaurs with whom
> no divine being would ever associate. 

It's being used as a verb, meaning it takes this definition:

v. tr.
    1. To foretell through or as if through the art of divination.
    2.
          1. To know by inspiration, intuition, or reflection.
          2. To guess.
    3. To locate (underground water or minerals) with a divining rod; douse.

not the deity-adjective one.

http://dictionary.reference.com/search?q=divine

>  > Note: To prevent an attribute from being processed in this way, put
>  > a non-breaking zero-width space character (&#xFEFF;) at the start
>  > of the attribute. When the template is cloned, that character will
>  > be removed, but any other text in the attribute will be left alone.
>  > This could be useful if you have no control over the rest of the
>  > contents in the attribute, e.g. if it is user configurable text.
> 
> Why do we need this (arguably ugly hack) when the page author is free
> to select a value for the ID attribute? Surely, it must be possible to
> find a unique name? And, if curly brackets appear around a undefined
> name no processing will occur, right?

They're square brackets, actually. Although I think that using curly
brackets might well be a better idea. One is much less likely to run
into conflicts with curly brackets because they're rarely used in
regular text and generally not used in strings like this in programming
text.

   {obfusktedtmplnm}

is not going to be common enough in user input, imho, to warrant this
hack. :)

(Non-accidental use of the template name falls under the "deliberately
  malicious input cannot be avoided by client-side restrictions" case.)

>    <tr index="1">
>    <tr id="order" repeat="3">
> 
> The "repeat" attribute indicates that the element is a template. In
> HTML, the syntax can further be shortened:
> 
>    <tr id="order" repeat>

That won't work. The shortened syntax in HTML means that
'repeat' is the *value* of some attribute, not the name
of some attribute. E.g.

   <table border>

is equivalent to

   <table frame="border">

not

   <table border="">

Furthermore, the attribute must be the sort that lists all its
values explicitly, not CDATA or something like that.

>  > Prefilled rows can contain any content; it need not match the
>  > template. In order to be considered a part of the repetition model,
>  > however, the row must have a repeat attribute with a numeric value.
>  > That value can be any integer. (For example, you could use "-1" as
>  > the value of all prefilled rows.)
> 
> I don't understand why it must not be a valid index.

I don't understand what you're pointing out here.

> The repeat model is complex. Could we make is slightly simple by
> "dropping the repeat-template attribute?

The repeat model, according to Mark Schenk, is not flexible enough
as it is. He's got a great use case, I'll let him explain. :)

~fantasai

-- 
http://fantasai.inkedblade.net/contact

Received on Wednesday, 4 August 2004 02:34:12 UTC