Re: meta-data in the VTT file header, a strawman proposal

On Fri, Apr 20, 2012 at 3:40 PM, David Singer <singer@apple.com> wrote:
>
> On Apr 20, 2012, at 14:22 , Silvia Pfeiffer wrote:
>
>>>
>>> Note that ]] on a line by itself is pretty rare, even in a wiki, no?  That's the only case that needs escaping;  ]] on a line by itself, and blank (and for safety, apparently blank) lines.  Otherwise, the text goes through unmodified.  So lines containing ]] are fine.
>>>
>>> Since we're talking about existing implementations, this is almost exactly what SMTP uses for the body of a mail message, though there the terminator is a period (".") on a line by itself, and the blank line problem does not arise.
>>>
>>>> In my opinion the changes required to introduce white-space characters
>>>> at the beginning of a line are less intrusive than having to introduce
>>>> an escaping mechanism.
>>>
>>>
>>> Oh, so far I think the reverse.  822 requires a method to indicate true hard line breaks, for attribute values that need them, and that's an extension to 822.  For any common body of text with a number of lines that are empty or start with a non-blank character, all those lines need modifying, whereas an SMTP-like terminator syntax only needs to modify lines that look like a terminator and blank lines, which is a lot less in common cases.  A terminator-and-escape syntax ensures exact recovery of the original input, whereas with 822 one cannot tell the difference between lines that originally started with a blank, and lines that had one added for 822 compatibility.
>>
>>
>> OK, Glenn and you've made me see the problems with 822 - indeed we
>> would need some changes.
>>
>> But the "[[" and "]]" proposal is soo ugly and not used anywhere else.
>> I would be surprised if we couldn't find a solution that is being used
>> elsewhere.
>
>
> As I say, it's essentially what is used for mail message bodies in SMTP, plus the minimum extra needed for our application (blank-line suppression).

Not really. You don't have any name-value fields in a SMTP body, so
there is no need to distinguish between a single-line and a multi-line
name-value field.

Your proposal is simply to introduce special markers that identify the
start and end of a multi-line name-value field.


> Maybe there is an existing system like this that includes blank-line management;  anyone think of one?

YAML looked pretty neat - did you look at what I suggested earlier?

Cheers,
Silvia.

Received on Friday, 20 April 2012 06:06:43 UTC