W3C home > Mailing lists > Public > whatwg@whatwg.org > January 2011

[whatwg] Timed tracks: feedback compendium

From: Glenn Maynard <glenn@zewt.org>
Date: Wed, 5 Jan 2011 05:32:50 -0500
Message-ID: <AANLkTik+uXV79n1Nd15m0fLFMi0Jnj06Uj8=P2MO7kFY@mail.gmail.com>
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

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:59:29 UTC