- From: François Daoust via GitHub <sysbot+gh@w3.org>
- Date: Tue, 18 Sep 2018 13:01:18 +0000
- To: public-sdwig@w3.org
tidoust has just created a new issue for https://github.com/w3c/sdw: == WebVMT: use JSON instead of XML for cue content? == I believe I raised that informally somewhere but thought I'd capture it in a dedicated issue. WebVTT might seem to be using XML for cue text, but actually it does not! WebVTT defines its own syntax and [parsing rules](https://www.w3.org/TR/webvtt/#cue-text-parsing-rules). If I understood things correctly, this was done on purpose for multiple reasons, including ease of support on constrained devices (not having to include an XML parser library, not having to parse repeated XML fragments that may each define their own entities), ease of authoring (use of plain text whenever possible, use of tags only when needed), and security. People involved in WebVTT can probably clarify these reasons. These reasons seem to apply to WebVMT as well. Unless you want a pure XML format (à la TTML), it may not be such as good idea to mix XML with plain text as currently written. In short, I'm wondering whether it wouldn't be better to use JSON instead of an XML-based structure for cue content. Also, if WebVMT support remains up to Web applications, with cue content provided as a blob, XML makes web developers' life slightly more complex. In contrast, JSON is both easier to parse and process (just pass the text to `JSON.parse` to get a JS object that has the same structure). Please view or discuss this issue at https://github.com/w3c/sdw/issues/1077 using your GitHub account
Received on Tuesday, 18 September 2018 13:01:24 UTC