Thursday, 29 November 2012

WebVTT Syntax Rules Do Not Apply To Parser

Let's see what the World Wide Web Consortium (W3C) documentation and community say. I'll focus on WebVTT as much as possible. I'm sure I can find more and I've been told this twice on IRC.

Quotes

When writing something that reads WebVTT files, be very sure to parse it as specified by the parser--*not* by reading the syntax and coming up with your own parsing algorithm.

Glenn Maynard
http://lists.w3.org/Archives/Public/public-texttracks/2012Jul/0011.html


[Syntax rules] are requirements for writing, not for parsing. Requirements in that section don't apply to you.

Simon Pieters
http://lists.w3.org/Archives/Public/public-texttracks/2012Nov/0017.html


"It's a bit unusual for a standard to specify the parsing algorithm, but I can understand why."
It's not unusual for modern specs.  It's a much more dependable way of getting to consistent behavior than only specifying a format.

Glenn Maynard
http://lists.w3.org/Archives/Public/public-texttracks/2012Jul/0014.html


However, when we go to the parsing section of the spec, there is no step in the parser that makes sure that cues that are out of time order are ignored. This means that an implemented parser will pick up such cues and enter them into the list of cues to be used at the time that they are relevant.

(Note: This infers that implementations are independent of syntax requirements)

Silvia Pfeiffer
https://www.w3.org/Bugs/Public/show_bug.cgi?id=15632


Conformance requirements phrased as algorithms or specific steps may be implemented in any manner, so long as the end result is equivalent.

http://dev.w3.org/html5/spec//infrastructure.html#conformance-requirements

No comments:

Post a Comment