Re: Multiple Settings in a Cue

On Tue, 27 Nov 2012 03:13:26 +0100, Kyle Barnhart <kyle@barnhart.ca> wrote:

> Hello. I'm part of the Seneca College student who are implementing the
> WebVTT spec for Mozilla.
>
> The syntax rules state, "Each component must not be included more than  
> once
> per WebVTT cue settings string." The parsing rules allow for duplicate
> settings implicitly because it makes no such check. The splitting on a
> space creates a list, not an ordered list.

Why would it not be ordered?

> That means a cue with duplicate
> settings will parse but with unpredictable results.

The results are predictable if the list is ordered, which I have  
understood the spec to mean. Maybe it should be more explicit about that  
in the common microsyntax section.

> Question. Should this simply be left as unpredictable behaviour? Or  
> should
> the parser make the behaviour predictable? If the settings could be
> tokenized in to an ordered list then either it could use the first or  
> last
> duplicate setting (last should be easier).
>
> My feeling is that it should remain unpredictable because the syntax  
> states
> only one is allowed and therefore duplicate settings should not be
> supported.

No, that's not how things work. That something is invalid does not mean  
that the behavior should be unpredictable. Behavior should generally  
always be predictable.

> If this is the case, it might be useful to have a note in the
> setting paring section stating that while duplicate settings will be
> parsed, the behaviour will be unpredictable.
>
> http://dev.w3.org/html5/webvtt/#parse-the-webvtt-settings
> http://dev.w3.org/html5/spec//common-microsyntaxes.html#split-a-string-on-spaces
>
> Thank you,
> Kyle Barnhart

FTR,  
http://w3c-test.org/html/tests/submission/Opera/media/track/webvtt/parsing/001.html  
tests duplicate settings.

-- 
Simon Pieters
Opera Software

Received on Tuesday, 27 November 2012 10:50:30 UTC