[whatwg] Timed tracks: feedback compendium

On Wed, Jan 5, 2011 at 4:58 AM, Philip J?genstedt <philipj at opera.com> wrote:
> <!-- comments --> in particular won't work because --> is already used in
> the timing format:
>
> 00:00.000 --> 00:01.000
>
> In any case, coming up with a syntax is not a problem, /* comments */ and //
> comments like CSS/JavaScript are the most obvious choices.

Using a syntax that can be escaped with &gt; and &lt; avoids needing
to add additional escapes, though at the cost of an unusual comment
syntax.  Off the top of my head, <! ... !> resembles HTML comments
enough to be fairly obvious.

// comments would mean URLs in captions would require escaping.  Most
formats that use that style of comments are programming languages,
which don't have loose URLs outside of strings.

> The question is rather if the comments should be exposed as DOM comment
> nodes in getCueAsHTML, which seems to be what you're asking for. That would
> only be possible if comments were only allowed inside the cue text, which
> means that you couldn't comment out entire cues, as such:

I don't think getCueAsHTML helps an editor (since it's one-way); an
editor will probably need to have its own parser, which isn't a big
deal.  As long as there's support for comments in the file format, so
people don't need to make up a "working" file format just to add them,
that's enough; such a parser can handle comments however it wants.

> Therefore, my thinking is that comments should be removed during parsing and
> not be exposed to any layer above it.

That's fine.

-- 
Glenn Maynard

Received on Wednesday, 5 January 2011 02:32:50 UTC